Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 39ad46...5c2c02 )
by Sebastian
16s
created

Vf.preventDefault   A

Complexity

Conditions 1

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
dl 0
loc 1
rs 10
1
// OpenLayers 3. See http://openlayers.org/
2
// License: https://raw.githubusercontent.com/openlayers/ol3/master/LICENSE.md
3
// Version: v3.16.0-15-gafa740c
4
5
(function(){var q,aa=this;function ba(b){b.za=function(){return b.mc?b.mc:b.mc=new b}}
6
function ca(b){var c=typeof b;if("object"==c)if(b){if(b instanceof Array)return"array";if(b instanceof Object)return c;var d=Object.prototype.toString.call(b);if("[object Window]"==d)return"object";if("[object Array]"==d||"number"==typeof b.length&&"undefined"!=typeof b.splice&&"undefined"!=typeof b.propertyIsEnumerable&&!b.propertyIsEnumerable("splice"))return"array";if("[object Function]"==d||"undefined"!=typeof b.call&&"undefined"!=typeof b.propertyIsEnumerable&&!b.propertyIsEnumerable("call"))return"function"}else return"null";
7
else if("function"==c&&"undefined"==typeof b.call)return"object";return c}function da(b){var c=ca(b);return"array"==c||"object"==c&&"number"==typeof b.length}function ea(b){return"string"==typeof b}function fa(b){return"number"==typeof b}function ga(b){return"function"==ca(b)}function ha(b){var c=typeof b;return"object"==c&&null!=b||"function"==c}function x(b){return b[ia]||(b[ia]=++ja)}var ia="closure_uid_"+(1E9*Math.random()>>>0),ja=0;function ka(b,c,d){return b.call.apply(b.bind,arguments)}
8
function la(b,c,d){if(!b)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(d,e);return b.apply(c,d)}}return function(){return b.apply(c,arguments)}}function ma(b,c,d){ma=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ka:la;return ma.apply(null,arguments)}
9
function B(b,c){var d=b.split("."),e=aa;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function H(b,c){function d(){}d.prototype=c.prototype;b.R=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.Ae=function(b,d,g){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return c.prototype[d].apply(b,h)}};var na;function oa(){}var I=Function("return this")();var pa;var qa=String.prototype.trim?function(b){return b.trim()}:function(b){return b.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function ra(b){if(!sa.test(b))return b;-1!=b.indexOf("&")&&(b=b.replace(ta,"&amp;"));-1!=b.indexOf("<")&&(b=b.replace(ua,"&lt;"));-1!=b.indexOf(">")&&(b=b.replace(va,"&gt;"));-1!=b.indexOf('"')&&(b=b.replace(wa,"&quot;"));-1!=b.indexOf("'")&&(b=b.replace(xa,"&#39;"));-1!=b.indexOf("\x00")&&(b=b.replace(ya,"&#0;"));return b}var ta=/&/g,ua=/</g,va=/>/g,wa=/"/g,xa=/'/g,ya=/\x00/g,sa=/[\x00&<>"']/;
10
function Aa(b,c){return b<c?-1:b>c?1:0};function Ba(b,c,d){return Math.min(Math.max(b,c),d)}var Ca=function(){var b;"cosh"in Math?b=Math.cosh:b=function(b){b=Math.exp(b);return(b+1/b)/2};return b}();function Da(b,c){var d=b%c;return 0>d*c?d+c:d};function Ea(b){return function(c){if(c)return[Ba(c[0],b[0],b[2]),Ba(c[1],b[1],b[3])]}}function Fa(b){return b};function Ga(b,c,d){this.center=b;this.resolution=c;this.rotation=d};var Ha="function"===typeof Object.assign?Object.assign:function(b,c){if(void 0===b||null===b)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(b),e=1,f=arguments.length;e<f;++e){var g=arguments[e];if(void 0!==g&&null!==g)for(var h in g)g.hasOwnProperty(h)&&(d[h]=g[h])}return d};function Ia(b){for(var c in b)delete b[c]}function Ja(b){var c=[],d;for(d in b)c.push(b[d]);return c}function Ka(b){for(var c in b)return!1;return!c};var La="olm_"+(1E4*Math.random()|0);function Ma(b){function c(c){var e=b.listener,f=b.Vb||b.target;b.Xb&&L(b);return e.call(f,c)}return b.Wb=c}function Na(b,c,d,e){for(var f,g=0,h=b.length;g<h;++g)if(f=b[g],f.listener===c&&f.Vb===d)return e&&(f.deleteIndex=g),f}function Oa(b,c){var d=b[La];return d?d[c]:void 0}function Pa(b){var c=b[La];c||(c=b[La]={});return c}
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if c is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
11
function Ra(b,c){var d=Oa(b,c);if(d){for(var e=0,f=d.length;e<f;++e)b.removeEventListener(c,d[e].Wb),Ia(d[e]);d.length=0;if(d=b[La])delete d[c],0===Object.keys(d).length&&delete b[La]}}function M(b,c,d,e,f){var g=Pa(b),h=g[c];h||(h=g[c]=[]);(g=Na(h,d,e,!1))?f||(g.Xb=!1):(g={Vb:e,Xb:!!f,listener:d,target:b,type:c},b.addEventListener(c,Ma(g)),h.push(g));return g}function Sa(b,c,d,e){return M(b,c,d,e,!0)}function Ta(b,c,d,e){(b=Oa(b,c))&&(d=Na(b,d,e,!0))&&L(d)}
12
function L(b){if(b&&b.target){b.target.removeEventListener(b.type,b.Wb);var c=Oa(b.target,b.type);if(c){var d="deleteIndex"in b?b.deleteIndex:c.indexOf(b);-1!==d&&c.splice(d,1);0===c.length&&Ra(b.target,b.type)}Ia(b)}}function Ua(b){var c=Pa(b),d;for(d in c)Ra(b,d)};function Va(){}Va.prototype.ja=!1;function Wa(b){b.ja||(b.ja=!0,b.L())}Va.prototype.L=oa;function R(b,c){this.type=b;this.target=c||null}R.prototype.preventDefault=R.prototype.stopPropagation=function(){this.Zd=!0};function Xa(b){b.stopPropagation()};function Ya(){this.W={};this.H={};this.A={}}H(Ya,Va);Ya.prototype.addEventListener=function(b,c){var d=this.A[b];d||(d=this.A[b]=[]);-1===d.indexOf(c)&&d.push(c)};function S(b,c){var d="string"===typeof c?new R(c):c,e=d.type;d.target=b;var f=b.A[e],g;if(f){e in b.H||(b.H[e]=0,b.W[e]=0);++b.H[e];for(var h=0,k=f.length;h<k;++h)if(!1===f[h].call(b,d)||d.Zd){g=!1;break}--b.H[e];if(0===b.H[e]){d=b.W[e];for(delete b.W[e];d--;)b.removeEventListener(e,oa);delete b.H[e]}return g}}Ya.prototype.L=function(){Ua(this)};
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if f is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
13
function Za(b,c){return c?c in b.A:0<Object.keys(b.A).length}Ya.prototype.removeEventListener=function(b,c){var d=this.A[b];if(d){var e=d.indexOf(c);b in this.W?(d[e]=oa,++this.W[b]):(d.splice(e,1),0===d.length&&delete this.A[b])}};function $a(){Ya.call(this);this.g=0}H($a,Ya);$a.prototype.f=function(){++this.g;S(this,"change")};$a.prototype.$=function(b,c,d){if(Array.isArray(b)){for(var e=b.length,f=Array(e),g=0;g<e;++g)f[g]=M(this,b[g],c,d);return f}return M(this,b,c,d)};$a.prototype.da=function(b,c,d){if(Array.isArray(b))for(var e=0,f=b.length;e<f;++e)Ta(this,b[e],c,d);else Ta(this,b,c,d)};function ab(b,c,d){R.call(this,b);this.key=c;this.oldValue=d}H(ab,R);function T(b){$a.call(this);x(this);this.K={};void 0!==b&&this.F(b)}H(T,$a);var bb={};function U(b){return bb.hasOwnProperty(b)?bb[b]:bb[b]="change:"+b}T.prototype.get=function(b){var c;this.K.hasOwnProperty(b)&&(c=this.K[b]);return c};T.prototype.set=function(b,c,d){d?this.K[b]=c:(d=this.K[b],this.K[b]=c,d!==c&&(c=U(b),S(this,new ab(c,b,d)),S(this,new ab("propertychange",b,d))))};
14
T.prototype.F=function(b,c){for(var d in b)this.set(d,b[d],c)};function cb(b,c){return b>c?1:b<c?-1:0}function db(b,c,d){var e=b.length;if(b[0]<=c)return 0;if(!(c<=b[e-1]))if(0<d)for(d=1;d<e;++d){if(b[d]<c)return d-1}else if(0>d)for(d=1;d<e;++d){if(b[d]<=c)return d}else for(d=1;d<e;++d){if(b[d]==c)return d;if(b[d]<c)return b[d-1]-c<c-b[d]?d-1:d}return e-1}function eb(b,c){var d,e=da(c)?c:[c],f=e.length;for(d=0;d<f;d++)b[b.length]=e[d]}function fb(b,c){var d=b.indexOf(c),e=-1<d;e&&b.splice(d,1);return e}
15
function gb(b,c){var d=b.length;if(d!==c.length)return!1;for(var e=0;e<d;e++)if(b[e]!==c[e])return!1;return!0}function hb(b){var c=ib,d=b.length,e=Array(b.length),f;for(f=0;f<d;f++)e[f]={index:f,value:b[f]};e.sort(function(b,d){return c(b.value,d.value)||b.index-d.index});for(f=0;f<b.length;f++)b[f]=e[f].value};function jb(b){return function(c,d,e){if(void 0!==c)return c=db(b,c,e),c=Ba(c+d,0,b.length-1),b[c]}}function kb(b,c,d){return function(e,f,g){if(void 0!==e)return e=Math.max(Math.floor(Math.log(c/e)/Math.log(b)+(0<g?0:0>g?1:.5))+f,0),void 0!==d&&(e=Math.min(e,d)),c/Math.pow(b,e)}};function lb(b){if(void 0!==b)return 0}function mb(b,c){if(void 0!==b)return b+c}function nb(b){var c=2*Math.PI/b;return function(b,e){if(void 0!==b)return b=Math.floor((b+e)/c+.5)*c}}function ob(){var b=5*Math.PI/180;return function(c,d){if(void 0!==c)return Math.abs(c+d)<=b?0:c+d}};function pb(b,c){b[0]+=c[0];b[1]+=c[1]}function qb(b,c){var d=Math.cos(c),e=Math.sin(c),f=b[1]*d+b[0]*e;b[0]=b[0]*d-b[1]*e;b[1]=f};function rb(b){for(var c=sb(),d=0,e=b.length;d<e;++d)tb(c,b[d]);return c}function ub(b,c,d){return d?(d[0]=b[0]-c,d[1]=b[1]-c,d[2]=b[2]+c,d[3]=b[3]+c,d):[b[0]-c,b[1]-c,b[2]+c,b[3]+c]}function vb(b,c){return c?(c[0]=b[0],c[1]=b[1],c[2]=b[2],c[3]=b[3],c):b.slice()}function wb(b,c){return b[0]<=c[0]&&c[2]<=b[2]&&b[1]<=c[1]&&c[3]<=b[3]}function sb(){return[Infinity,Infinity,-Infinity,-Infinity]}function xb(b,c,d,e,f){return f?(f[0]=b,f[1]=c,f[2]=d,f[3]=e,f):[b,c,d,e]}
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if void(0) !== b is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if void(0) !== e is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if void(0) !== c is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
16
function yb(b,c){var d=b[0],e=b[1];return xb(d,e,d,e,c)}function zb(b,c){return b[0]==c[0]&&b[2]==c[2]&&b[1]==c[1]&&b[3]==c[3]}function tb(b,c){c[0]<b[0]&&(b[0]=c[0]);c[0]>b[2]&&(b[2]=c[0]);c[1]<b[1]&&(b[1]=c[1]);c[1]>b[3]&&(b[3]=c[1])}function Ab(b,c,d,e,f){for(;d<e;d+=f){var g=b,h=c[d],k=c[d+1];g[0]=Math.min(g[0],h);g[1]=Math.min(g[1],k);g[2]=Math.max(g[2],h);g[3]=Math.max(g[3],k)}return b}function Bb(b){var c=0;Cb(b)||(c=Db(b)*Eb(b));return c}function Fb(b){return[b[0],b[1]]}
17
function Gb(b){return[(b[0]+b[2])/2,(b[1]+b[3])/2]}function Hb(b,c,d,e,f){var g=c*e[0]/2;e=c*e[1]/2;c=Math.cos(d);var h=Math.sin(d);d=g*c;g*=h;c*=e;var k=e*h,l=b[0],m=b[1];b=l-d+k;e=l-d-k;h=l+d-k;d=l+d+k;var k=m-g-c,l=m-g+c,n=m+g+c,g=m+g-c;return xb(Math.min(b,e,h,d),Math.min(k,l,n,g),Math.max(b,e,h,d),Math.max(k,l,n,g),f)}function Eb(b){return b[3]-b[1]}
18
function Ib(b,c,d){d=d?d:sb();Jb(b,c)&&(d[0]=b[0]>c[0]?b[0]:c[0],d[1]=b[1]>c[1]?b[1]:c[1],d[2]=b[2]<c[2]?b[2]:c[2],d[3]=b[3]<c[3]?b[3]:c[3]);return d}function Kb(b){return[b[0],b[3]]}function Db(b){return b[2]-b[0]}function Jb(b,c){return b[0]<=c[2]&&b[2]>=c[0]&&b[1]<=c[3]&&b[3]>=c[1]}function Cb(b){return b[2]<b[0]||b[3]<b[1]}function Lb(b,c){var d=(b[2]-b[0])/2*(c-1),e=(b[3]-b[1])/2*(c-1);b[0]-=d;b[2]+=d;b[1]-=e;b[3]+=e};function Mb(){return!0}function Nb(){return!1};/*
19
20
 Latitude/longitude spherical geodesy formulae taken from
21
 http://www.movable-type.co.uk/scripts/latlong.html
22
 Licensed under CC-BY-3.0.
23
*/
24
function Ob(b){this.radius=b}function Pb(b,c){var d=b[1]*Math.PI/180,e=c[1]*Math.PI/180,f=(e-d)/2,g=(c[0]-b[0])*Math.PI/180/2,d=Math.sin(f)*Math.sin(f)+Math.sin(g)*Math.sin(g)*Math.cos(d)*Math.cos(e);return 2*Qb.radius*Math.atan2(Math.sqrt(d),Math.sqrt(1-d))}
25
Ob.prototype.offset=function(b,c,d){var e=b[1]*Math.PI/180;c/=this.radius;var f=Math.asin(Math.sin(e)*Math.cos(c)+Math.cos(e)*Math.sin(c)*Math.cos(d));return[180*(b[0]*Math.PI/180+Math.atan2(Math.sin(d)*Math.sin(c)*Math.cos(e),Math.cos(c)-Math.sin(e)*Math.sin(f)))/Math.PI,180*f/Math.PI]};var Qb=new Ob(6370997);var Rb={};Rb.degrees=2*Math.PI*Qb.radius/360;Rb.ft=.3048;Rb.m=1;Rb["us-ft"]=1200/3937;function Sb(b){this.a=b.code;this.g=b.units;this.h=void 0!==b.extent?b.extent:null;this.f=void 0!==b.global?b.global:!1;this.b=!(!this.f||!this.h);this.i=void 0!==b.getPointResolution?b.getPointResolution:this.j;this.c=null;this.l=b.metersPerUnit}Sb.prototype.B=function(){return this.h};function Tb(b){return b.l||Rb[b.g]}
26
Sb.prototype.j=function(b,c){if("degrees"==this.g)return b;var d=Ub(this,Vb("EPSG:4326")),e=[c[0]-b/2,c[1],c[0]+b/2,c[1],c[0],c[1]-b/2,c[0],c[1]+b/2],e=d(e,e,2),d=(Pb(e.slice(0,2),e.slice(2,4))+Pb(e.slice(4,6),e.slice(6,8)))/2,e=Tb(this);void 0!==e&&(d/=e);return d};Sb.prototype.getPointResolution=function(b,c){return this.i(b,c)};var Wb={},Xb={};function Yb(b){Zb(b);b.forEach(function(c){b.forEach(function(b){c!==b&&$b(c,b,ac)})})}function bc(b){Wb[b.a]=b;$b(b,b,ac)}
27
function Zb(b){var c=[];b.forEach(function(b){c.push(bc(b))})}function cc(b){return b?"string"===typeof b?Vb(b):b:Vb("EPSG:3857")}function $b(b,c,d){b=b.a;c=c.a;b in Xb||(Xb[b]={});Xb[b][c]=d}function Vb(b){var c;b instanceof Sb?c=b:"string"===typeof b?c=Wb[b]:c=null;return c}function dc(b,c){if(b===c)return!0;var d=b.g===c.g;return b.a===c.a?d:Ub(b,c)===ac&&d}function ec(b,c){var d=Vb(b),e=Vb(c);return Ub(d,e)}
28
function Ub(b,c){var d=b.a,e=c.a,f;d in Xb&&e in Xb[d]&&(f=Xb[d][e]);void 0===f&&(f=fc);return f}function fc(b,c){if(void 0!==c&&b!==c){for(var d=0,e=b.length;d<e;++d)c[d]=b[d];b=c}return b}function ac(b,c){var d;if(void 0!==c){d=0;for(var e=b.length;d<e;++d)c[d]=b[d];d=c}else d=b.slice();return d};function gc(){T.call(this);this.o=sb();this.s=-1;this.j={};this.D=this.l=0}H(gc,T);gc.prototype.B=function(b){this.s!=this.g&&(this.o=this.Db(this.o),this.s=this.g);var c=this.o;b?(b[0]=c[0],b[1]=c[1],b[2]=c[2],b[3]=c[3]):b=c;return b};function hc(b){this.length=b.length||b;for(var c=0;c<this.length;c++)this[c]=b[c]||0}hc.prototype.BYTES_PER_ELEMENT=4;hc.prototype.set=function(b,c){c=c||0;for(var d=0;d<b.length&&c+d<this.length;d++)this[c+d]=b[d]};hc.prototype.toString=Array.prototype.join;"undefined"==typeof Float32Array&&(hc.BYTES_PER_ELEMENT=4,hc.prototype.BYTES_PER_ELEMENT=hc.prototype.BYTES_PER_ELEMENT,hc.prototype.set=hc.prototype.set,hc.prototype.toString=hc.prototype.toString,B("Float32Array",hc));function ic(b){this.length=b.length||b;for(var c=0;c<this.length;c++)this[c]=b[c]||0}ic.prototype.BYTES_PER_ELEMENT=8;ic.prototype.set=function(b,c){c=c||0;for(var d=0;d<b.length&&c+d<this.length;d++)this[c+d]=b[d]};ic.prototype.toString=Array.prototype.join;if("undefined"==typeof Float64Array){try{ic.BYTES_PER_ELEMENT=8}catch(b){}ic.prototype.BYTES_PER_ELEMENT=ic.prototype.BYTES_PER_ELEMENT;ic.prototype.set=ic.prototype.set;ic.prototype.toString=ic.prototype.toString;B("Float64Array",ic)};function jc(b,c,d,e,f){b[0]=c;b[1]=d;b[2]=e;b[3]=f};function kc(){var b=Array(16);lc(b,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return b}function mc(){var b=Array(16);lc(b,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return b}function lc(b,c,d,e,f,g,h,k,l,m,n,p,r,t,u,y,z){b[0]=c;b[1]=d;b[2]=e;b[3]=f;b[4]=g;b[5]=h;b[6]=k;b[7]=l;b[8]=m;b[9]=n;b[10]=p;b[11]=r;b[12]=t;b[13]=u;b[14]=y;b[15]=z}function nc(b){b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=1;b[6]=0;b[7]=0;b[8]=0;b[9]=0;b[10]=1;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1}
0 ignored issues
show
Coding Style Comprehensibility Best Practice introduced by
Empty catch clauses should be used with caution; consider adding a comment why this is needed.
Loading history...
29
function oc(b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],k=b[5],l=b[6],m=b[7],n=b[8],p=b[9],r=b[10],t=b[11],u=b[12],y=b[13],z=b[14],C=b[15],v=d*k-e*h,w=d*l-f*h,D=d*m-g*h,E=e*l-f*k,G=e*m-g*k,F=f*m-g*l,N=n*y-p*u,A=n*z-r*u,J=n*C-t*u,P=p*z-r*y,K=p*C-t*y,Q=r*C-t*z,O=v*Q-w*K+D*P+E*J-G*A+F*N;0!=O&&(O=1/O,c[0]=(k*Q-l*K+m*P)*O,c[1]=(-e*Q+f*K-g*P)*O,c[2]=(y*F-z*G+C*E)*O,c[3]=(-p*F+r*G-t*E)*O,c[4]=(-h*Q+l*J-m*A)*O,c[5]=(d*Q-f*J+g*A)*O,c[6]=(-u*F+z*D-C*w)*O,c[7]=(n*F-r*D+t*w)*O,c[8]=(h*K-k*J+m*N)*O,c[9]=(-d*K+
30
e*J-g*N)*O,c[10]=(u*G-y*D+C*v)*O,c[11]=(-n*G+p*D-t*v)*O,c[12]=(-h*P+k*A-l*N)*O,c[13]=(d*P-e*A+f*N)*O,c[14]=(-u*E+y*w-z*v)*O,c[15]=(n*E-p*w+r*v)*O)}function pc(b,c,d){var e=b[1]*c+b[5]*d+0*b[9]+b[13],f=b[2]*c+b[6]*d+0*b[10]+b[14],g=b[3]*c+b[7]*d+0*b[11]+b[15];b[12]=b[0]*c+b[4]*d+0*b[8]+b[12];b[13]=e;b[14]=f;b[15]=g}function qc(b,c,d){lc(b,b[0]*c,b[1]*c,b[2]*c,b[3]*c,b[4]*d,b[5]*d,b[6]*d,b[7]*d,1*b[8],1*b[9],1*b[10],1*b[11],b[12],b[13],b[14],b[15])}
31
function rc(b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],k=b[5],l=b[6],m=b[7],n=Math.cos(c),p=Math.sin(c);b[0]=d*n+h*p;b[1]=e*n+k*p;b[2]=f*n+l*p;b[3]=g*n+m*p;b[4]=d*-p+h*n;b[5]=e*-p+k*n;b[6]=f*-p+l*n;b[7]=g*-p+m*n}new Float64Array(3);new Float64Array(3);new Float64Array(4);new Float64Array(4);new Float64Array(4);new Float64Array(16);function sc(b,c,d,e,f,g){var h=f[0],k=f[1],l=f[4],m=f[5],n=f[12];f=f[13];for(var p=g?g:[],r=0;c<d;c+=e){var t=b[c],u=b[c+1];p[r++]=h*t+l*u+n;p[r++]=k*t+m*u+f}g&&p.length!=r&&(p.length=r);return p};function V(){gc.call(this);this.h="XY";this.b=2;this.a=null}H(V,gc);function tc(b){if("XY"==b)return 2;if("XYZ"==b||"XYM"==b)return 3;if("XYZM"==b)return 4}V.prototype.Db=function(b){var c=this.a,d=this.a.length,e=this.b;b=xb(Infinity,Infinity,-Infinity,-Infinity,b);return Ab(b,c,0,d,e)};
0 ignored issues
show
Unused Code Best Practice introduced by
The object created with new Float64Array(3) is not used but discarded. Consider invoking another function instead of a constructor if you are doing this purely for side effects.
Loading history...
Unused Code Best Practice introduced by
The object created with new Float64Array(16) is not used but discarded. Consider invoking another function instead of a constructor if you are doing this purely for side effects.
Loading history...
Unused Code Best Practice introduced by
The object created with new Float64Array(4) is not used but discarded. Consider invoking another function instead of a constructor if you are doing this purely for side effects.
Loading history...
Complexity Best Practice introduced by
There is no return statement if "XYZM" == b is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
32
function uc(b,c){b.D!=b.g&&(Ia(b.j),b.l=0,b.D=b.g);if(0>c||0!==b.l&&c<=b.l)return b;var d=c.toString();if(b.j.hasOwnProperty(d))return b.j[d];var e=b.Ma(c);if(e.a.length<b.a.length)return b.j[d]=e;b.l=c;return b}V.prototype.Ma=function(){return this};function W(b,c,d){b.b=tc(c);b.h=c;b.a=d}function vc(b,c,d,e){if(c)d=tc(c);else{for(c=0;c<e;++c){if(0===d.length){b.h="XY";b.b=2;return}d=d[0]}d=d.length;c=2==d?"XY":3==d?"XYZ":4==d?"XYZM":void 0}b.h=c;b.b=d}
33
V.prototype.rotate=function(b,c){var d=this.a;if(d){for(var e=d.length,f=this.b,g=d?d:[],h=Math.cos(b),k=Math.sin(b),l=c[0],m=c[1],n=0,p=0;p<e;p+=f){var r=d[p]-l,t=d[p+1]-m;g[n++]=l+r*h-t*k;g[n++]=m+r*k+t*h;for(r=p+2;r<p+f;++r)g[n++]=d[r]}d&&g.length!=n&&(g.length=n);this.f()}};function wc(b,c){var d=0,e,f;e=0;for(f=c.length;e<f;++e)b[d++]=c[e];return d}function xc(b,c,d,e){var f,g;f=0;for(g=d.length;f<g;++f){var h=d[f],k;for(k=0;k<e;++k)b[c++]=h[k]}return c}function yc(b,c,d,e,f){f=f?f:[];var g=0,h,k;h=0;for(k=d.length;h<k;++h)c=xc(b,c,d[h],e),f[g++]=c;f.length=g;return f};function zc(b,c,d,e,f){f=void 0!==f?f:[];for(var g=0;c<d;c+=e)f[g++]=b.slice(c,c+e);f.length=g;return f}function Ac(b,c,d,e,f){f=void 0!==f?f:[];var g=0,h,k;h=0;for(k=d.length;h<k;++h){var l=d[h];f[g++]=zc(b,c,l,e,f[g]);c=l}f.length=g;return f};function Bc(b,c,d,e,f,g,h){var k=(d-c)/e;if(3>k){for(;c<d;c+=e)g[h++]=b[c],g[h++]=b[c+1];return h}var l=Array(k);l[0]=1;l[k-1]=1;d=[c,d-e];for(var m=0,n;0<d.length;){var p=d.pop(),r=d.pop(),t=0,u=b[r],y=b[r+1],z=b[p],C=b[p+1];for(n=r+e;n<p;n+=e){var v,w=b[n];v=b[n+1];var D=u,E=y,G=z-D,F=C-E;if(0!==G||0!==F){var N=((w-D)*G+(v-E)*F)/(G*G+F*F);1<N?(D=z,E=C):0<N&&(D+=G*N,E+=F*N)}w=D-w;v=E-v;v=w*w+v*v;v>t&&(m=n,t=v)}t>f&&(l[(m-c)/e]=1,r+e<m&&d.push(r,m),m+e<p&&d.push(m,p))}for(n=0;n<k;++n)l[n]&&(g[h++]=
34
b[c+n*e],g[h++]=b[c+n*e+1]);return h}
35
function Cc(b,c,d,e,f,g,h,k){var l,m;l=0;for(m=d.length;l<m;++l){var n=d[l];a:{var p=b,r=n,t=e,u=f,y=g;if(c!=r){var z=u*Math.round(p[c]/u),C=u*Math.round(p[c+1]/u);c+=t;y[h++]=z;y[h++]=C;var v,w;do if(v=u*Math.round(p[c]/u),w=u*Math.round(p[c+1]/u),c+=t,c==r){y[h++]=v;y[h++]=w;break a}while(v==z&&w==C);for(;c<r;){var D,E;D=u*Math.round(p[c]/u);E=u*Math.round(p[c+1]/u);c+=t;if(D!=v||E!=w){var G=v-z,F=w-C,N=D-z,A=E-C;G*A==F*N&&(0>G&&N<G||G==N||0<G&&N>G)&&(0>F&&A<F||F==A||0<F&&A>F)||(y[h++]=v,y[h++]=
36
w,z=v,C=w);v=D;w=E}}y[h++]=v;y[h++]=w}}k.push(h);c=n}return h};function Dc(b,c){V.call(this);this.U(b,c)}H(Dc,V);q=Dc.prototype;q.clone=function(){var b=new Dc(null);W(b,this.h,this.a.slice());b.f();return b};q.xa=function(){return zc(this.a,0,this.a.length,this.b)};q.Ma=function(b){var c=[];c.length=Bc(this.a,0,this.a.length,this.b,b,c,0);b=new Dc(null);W(b,"XY",c);b.f();return b};q.X=function(){return"LinearRing"};q.U=function(b,c){b?(vc(this,c,b,1),this.a||(this.a=[]),this.a.length=xc(this.a,0,b,this.b)):W(this,"XY",null);this.f()};function Ec(b,c){V.call(this);this.U(b,c)}H(Ec,V);q=Ec.prototype;q.clone=function(){var b=new Ec(null);W(b,this.h,this.a.slice());b.f();return b};q.xa=function(){return this.a?this.a.slice():[]};q.Db=function(b){return yb(this.a,b)};q.X=function(){return"Point"};q.U=function(b,c){b?(vc(this,c,b,0),this.a||(this.a=[]),this.a.length=wc(this.a,b)):W(this,"XY",null);this.f()};function Fc(b,c,d,e,f,g){for(var h=!1,k=b[d-e],l=b[d-e+1];c<d;c+=e){var m=b[c],n=b[c+1];l>g!=n>g&&f<(m-k)*(g-l)/(n-l)+k&&(h=!h);k=m;l=n}return h};function Gc(b,c,d,e,f,g,h){var k,l,m,n,p,r=f[g+1],t=[],u=d[0];m=b[u-e];p=b[u-e+1];for(k=c;k<u;k+=e){n=b[k];l=b[k+1];if(r<=p&&l<=r||p<=r&&r<=l)m=(r-p)/(l-p)*(n-m)+m,t.push(m);m=n;p=l}u=NaN;p=-Infinity;t.sort(cb);m=t[0];k=1;for(l=t.length;k<l;++k){n=t[k];var y=Math.abs(n-m);if(y>p){m=(m+n)/2;var z;a:if(0!==d.length&&Fc(b,c,d[0],e,m,r)){var C;z=1;for(C=d.length;z<C;++z)if(Fc(b,d[z-1],d[z],e,m,r)){z=!1;break a}z=!0}else z=!1;z&&(u=m,p=y)}m=n}isNaN(u)&&(u=f[g]);return h?(h.push(u,r),h):[u,r]};function Hc(b,c,d,e){for(var f=0,g=b[d-e],h=b[d-e+1];c<d;c+=e)var k=b[c],l=b[c+1],f=f+(k-g)*(l+h),g=k,h=l;return 0<f}function Ic(b,c,d,e){var f=0;e=void 0!==e?e:!1;var g,h;g=0;for(h=c.length;g<h;++g){var k=c[g],f=Hc(b,f,k,d);if(0===g){if(e&&f||!e&&!f)return!1}else if(e&&!f||!e&&f)return!1;f=k}return!0}
37
function Jc(b,c,d,e,f){f=void 0!==f?f:!1;var g,h;g=0;for(h=d.length;g<h;++g){var k=d[g],l=Hc(b,c,k,e);if(0===g?f&&l||!f&&!l:f&&!l||!f&&l)for(var l=b,m=k,n=e;c<m-n;){var p;for(p=0;p<n;++p){var r=l[c+p];l[c+p]=l[m-n+p];l[m-n+p]=r}c+=n;m-=n}c=k}return c}function Kc(b,c,d,e){var f=0,g,h;g=0;for(h=c.length;g<h;++g)f=Jc(b,f,c[g],d,e);return f};function Lc(b,c){V.call(this);this.c=[];this.u=-1;this.v=null;this.w=-1;this.i=null;this.U(b,c)}H(Lc,V);q=Lc.prototype;q.clone=function(){var b=new Lc(null);Mc(b,this.h,this.a.slice(),this.c.slice());return b};q.xa=function(b){var c;void 0!==b?(c=Nc(this).slice(),Jc(c,0,this.c,this.b,b)):c=this.a;return Ac(c,0,this.c,this.b)};q.Za=function(){return this.c};function Oc(b){if(b.u!=b.g){var c=Gb(b.B());b.v=Gc(Nc(b),0,b.c,b.b,c,0);b.u=b.g}return b.v}
38
function Nc(b){if(b.w!=b.g){var c=b.a;Ic(c,b.c,b.b)?b.i=c:(b.i=c.slice(),b.i.length=Jc(b.i,0,b.c,b.b));b.w=b.g}return b.i}q.Ma=function(b){var c=[],d=[];c.length=Cc(this.a,0,this.c,this.b,Math.sqrt(b),c,0,d);b=new Lc(null);Mc(b,"XY",c,d);return b};q.X=function(){return"Polygon"};q.U=function(b,c){if(b){vc(this,c,b,2);this.a||(this.a=[]);var d=yc(this.a,0,b,this.b,this.c);this.a.length=0===d.length?0:d[d.length-1];this.f()}else Mc(this,"XY",null,this.c)};function Mc(b,c,d,e){W(b,c,d);b.c=e;b.f()};function X(b){T.call(this);b=b||{};this.b=[0,0];var c={};c.center=void 0!==b.center?b.center:null;this.j=cc(b.projection);var d,e,f,g=void 0!==b.minZoom?b.minZoom:0;d=void 0!==b.maxZoom?b.maxZoom:28;var h=void 0!==b.zoomFactor?b.zoomFactor:2;if(void 0!==b.resolutions)d=b.resolutions,e=d[0],f=d[d.length-1],d=jb(d);else{e=cc(b.projection);f=e.B();var k=(f?Math.max(Db(f),Eb(f)):360*Rb.degrees/Tb(e))/256/Math.pow(2,0),l=k/Math.pow(2,28);e=b.maxResolution;void 0!==e?g=0:e=k/Math.pow(h,g);f=b.minResolution;
39
void 0===f&&(f=void 0!==b.maxZoom?void 0!==b.maxResolution?e/Math.pow(h,d):k/Math.pow(h,d):l);d=g+Math.floor(Math.log(e/f)/Math.log(h));f=e/Math.pow(h,d-g);d=kb(h,e,d-g)}this.c=e;this.i=f;this.h=g;g=void 0!==b.extent?Ea(b.extent):Fa;(void 0!==b.enableRotation?b.enableRotation:1)?(e=b.constrainRotation,e=void 0===e||!0===e?ob():!1===e?mb:fa(e)?nb(e):mb):e=lb;this.a=new Ga(g,d,e);void 0!==b.resolution?c.resolution=b.resolution:void 0!==b.zoom&&(c.resolution=this.constrainResolution(this.c,b.zoom-this.h));
40
c.rotation=void 0!==b.rotation?b.rotation:0;this.F(c)}H(X,T);q=X.prototype;q.constrainResolution=function(b,c,d){return this.a.resolution(b,c||0,d||0)};q.constrainRotation=function(b,c){return this.a.rotation(b,c||0)};q.aa=function(){return this.get("center")};function Pc(b,c){var d=b.aa(),e=b.G(),f=b.N();return Hb(d,e,f,c)}q.G=function(){return this.get("resolution")};function Qc(b,c){return Math.max(Db(b)/c[0],Eb(b)/c[1])}q.N=function(){return this.get("rotation")};
41
q.I=function(){var b=this.aa(),c=this.j,d=this.G(),e=this.N();return{center:[Math.round(b[0]/d)*d,Math.round(b[1]/d)*d],projection:void 0!==c?c:null,resolution:d,rotation:e}};q.Vc=function(){var b,c=this.G();if(void 0!==c){var d,e=0;do{d=this.constrainResolution(this.c,e);if(d==c){b=e;break}++e}while(d>this.i)}return void 0!==b?this.h+b:b};
42
q.ic=function(b,c,d){if(!(b instanceof V)){var e=b[0],f=b[1],g=b[2],h=b[3],e=[e,f,e,h,g,h,g,f,e,f],f=new Lc(null);Mc(f,"XY",e,[e.length]);b=f}e=d||{};d=void 0!==e.padding?e.padding:[0,0,0,0];var h=void 0!==e.constrainResolution?e.constrainResolution:!0,f=void 0!==e.nearest?e.nearest:!1,k;void 0!==e.minResolution?k=e.minResolution:void 0!==e.maxZoom?k=this.constrainResolution(this.c,e.maxZoom-this.h,0):k=0;var l=b.a,g=this.N(),e=Math.cos(-g),g=Math.sin(-g),m=Infinity,n=Infinity,p=-Infinity,r=-Infinity;
43
b=b.b;for(var t=0,u=l.length;t<u;t+=b)var y=l[t]*e-l[t+1]*g,z=l[t]*g+l[t+1]*e,m=Math.min(m,y),n=Math.min(n,z),p=Math.max(p,y),r=Math.max(r,z);c=Qc([m,n,p,r],[c[0]-d[1]-d[3],c[1]-d[0]-d[2]]);c=isNaN(c)?k:Math.max(c,k);h&&(k=this.constrainResolution(c,0,0),!f&&k<c&&(k=this.constrainResolution(k,-1,0)),c=k);this.Pa(c);g=-g;k=(m+p)/2+(d[1]-d[3])/2*c;c=(n+r)/2+(d[0]-d[2])/2*c;this.la([k*e-c*g,c*e+k*g])};function Rc(b){return!!b.aa()&&void 0!==b.G()}
44
q.rotate=function(b,c){if(void 0!==c){var d,e=this.aa();void 0!==e&&(d=[e[0]-c[0],e[1]-c[1]],qb(d,b-this.N()),pb(d,c));this.la(d)}this.set("rotation",b)};q.la=function(b){this.set("center",b)};function Sc(b,c){b.b[1]+=c}q.Pa=function(b){this.set("resolution",b)};q.he=function(b){b=this.constrainResolution(this.c,b-this.h,0);this.Pa(b)};function Tc(b){return 1-Math.pow(1-b,3)}function Uc(b){return 3*b*b-2*b*b*b}function Vc(b){return b};function Wc(b){var c=b.source,d=b.start?b.start:Date.now(),e=c[0],f=c[1],g=void 0!==b.duration?b.duration:1E3,h=b.easing?b.easing:Uc;return function(b,c){if(c.time<d)return c.animate=!0,c.viewHints[0]+=1,!0;if(c.time<d+g){var m=1-h((c.time-d)/g),n=e-c.viewState.center[0],p=f-c.viewState.center[1];c.animate=!0;c.viewState.center[0]+=m*n;c.viewState.center[1]+=m*p;c.viewHints[0]+=1;return!0}return!1}}
45
function Xc(b){var c=b.rotation?b.rotation:0,d=b.start?b.start:Date.now(),e=void 0!==b.duration?b.duration:1E3,f=b.easing?b.easing:Uc,g=b.anchor?b.anchor:null;return function(b,k){if(k.time<d)return k.animate=!0,k.viewHints[0]+=1,!0;if(k.time<d+e){var l=1-f((k.time-d)/e),l=(c-k.viewState.rotation)*l;k.animate=!0;k.viewState.rotation+=l;if(g){var m=k.viewState.center;m[0]-=g[0];m[1]-=g[1];qb(m,l);pb(m,g)}k.viewHints[0]+=1;return!0}return!1}}
46
function Yc(b){var c=b.resolution,d=b.start?b.start:Date.now(),e=void 0!==b.duration?b.duration:1E3,f=b.easing?b.easing:Uc;return function(b,h){if(h.time<d)return h.animate=!0,h.viewHints[0]+=1,!0;if(h.time<d+e){var k=1-f((h.time-d)/e),l=c-h.viewState.resolution;h.animate=!0;h.viewState.resolution+=k*l;h.viewHints[0]+=1;return!0}return!1}};function Zc(b,c,d,e){this.a=b;this.f=c;this.b=d;this.g=e}function $c(b,c,d){return b.a<=c&&c<=b.f&&b.b<=d&&d<=b.g}function ad(b,c){return b.a==c.a&&b.b==c.b&&b.f==c.f&&b.g==c.g}Zc.prototype.ga=function(){return this.f-this.a+1};function bd(b,c){return b.a<=c.f&&b.f>=c.a&&b.b<=c.g&&b.g>=c.b};function cd(b){this.b=b.html;this.a=b.tileRanges?b.tileRanges:null};function dd(b,c,d){R.call(this,b,d);this.element=c}H(dd,R);function ed(b){T.call(this);this.a=b?b:[];fd(this)}H(ed,T);q=ed.prototype;q.clear=function(){for(;0<this.get("length");)this.pop()};q.forEach=function(b,c){this.a.forEach(b,c)};q.Hd=function(){return this.a};q.item=function(b){return this.a[b]};q.pop=function(){return gd(this,this.get("length")-1)};q.push=function(b){var c=this.a.length;this.a.splice(c,0,b);fd(this);S(this,new dd("add",b,this));return c};
47
q.remove=function(b){var c=this.a,d,e;d=0;for(e=c.length;d<e;++d)if(c[d]===b)return gd(this,d)};function gd(b,c){var d=b.a[c];b.a.splice(c,1);fd(b);S(b,new dd("remove",d,b));return d}function fd(b){b.set("length",b.a.length)};var hd=Array.prototype.forEach?function(b,c,d){Array.prototype.forEach.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=ea(b)?b.split(""):b,g=0;g<e;g++)g in f&&c.call(d,f[g],g,b)};function id(b){var c=b.length;if(0<c){for(var d=Array(c),e=0;e<c;e++)d[e]=b[e];return d}return[]}function jd(b,c,d){return 2>=arguments.length?Array.prototype.slice.call(b,c):Array.prototype.slice.call(b,c,d)};function kd(b){if("string"!==typeof b){var c=b[0];c!=(c|0)&&(c=c+.5|0);var d=b[1];d!=(d|0)&&(d=d+.5|0);var e=b[2];e!=(e|0)&&(e=e+.5|0);b="rgba("+c+","+d+","+e+","+(void 0===b[3]?1:b[3])+")"}return b};function ld(b){return"string"===typeof b||b instanceof CanvasPattern||b instanceof CanvasGradient?b:kd(b)};var md;a:{var nd=aa.navigator;if(nd){var od=nd.userAgent;if(od){md=od;break a}}md=""}function pd(b){return-1!=md.indexOf(b)};function qd(b,c){for(var d in b)c.call(void 0,b[d],d,b)}var rd="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function sd(b,c){for(var d,e,f=1;f<arguments.length;f++){e=arguments[f];for(d in e)b[d]=e[d];for(var g=0;g<rd.length;g++)d=rd[g],Object.prototype.hasOwnProperty.call(e,d)&&(b[d]=e[d])}};var td=pd("Opera"),ud=pd("Trident")||pd("MSIE"),vd=pd("Edge"),wd=pd("Gecko")&&!(-1!=md.toLowerCase().indexOf("webkit")&&!pd("Edge"))&&!(pd("Trident")||pd("MSIE"))&&!pd("Edge"),xd=-1!=md.toLowerCase().indexOf("webkit")&&!pd("Edge");function yd(){var b=aa.document;return b?b.documentMode:void 0}var zd;
0 ignored issues
show
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
48
a:{var Ad="",Bd=function(){var b=md;if(wd)return/rv\:([^\);]+)(\)|;)/.exec(b);if(vd)return/Edge\/([\d\.]+)/.exec(b);if(ud)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(b);if(xd)return/WebKit\/(\S+)/.exec(b);if(td)return/(?:Version)[ \/]?(\S+)/.exec(b)}();Bd&&(Ad=Bd?Bd[1]:"");if(ud){var Cd=yd();if(null!=Cd&&Cd>parseFloat(Ad)){zd=String(Cd);break a}}zd=Ad}var Dd={};
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if td is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
49
function Ed(b){var c;if(!(c=Dd[b])){c=0;for(var d=qa(String(zd)).split("."),e=qa(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var h=d[g]||"",k=e[g]||"",l=RegExp("(\\d*)(\\D*)","g"),m=RegExp("(\\d*)(\\D*)","g");do{var n=l.exec(h)||["","",""],p=m.exec(k)||["","",""];if(0==n[0].length&&0==p[0].length)break;c=Aa(0==n[1].length?0:parseInt(n[1],10),0==p[1].length?0:parseInt(p[1],10))||Aa(0==n[2].length,0==p[2].length)||Aa(n[2],p[2])}while(0==c)}c=Dd[b]=0<=c}return c}
50
var Fd=aa.document,Gd=Fd&&ud?yd()||("CSS1Compat"==Fd.compatMode?parseInt(zd,10):5):void 0;var Hd=!ud||9<=Number(Gd);!wd&&!ud||ud&&9<=Number(Gd)||wd&&Ed("1.9.1");ud&&Ed("9");function Id(b,c){this.x=void 0!==b?b:0;this.y=void 0!==c?c:0}q=Id.prototype;q.clone=function(){return new Id(this.x,this.y)};q.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};q.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};q.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};q.scale=function(b,c){var d=fa(c)?c:b;this.x*=b;this.y*=d;return this};function Jd(b,c){this.width=b;this.height=c}q=Jd.prototype;q.clone=function(){return new Jd(this.width,this.height)};q.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};q.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};q.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};q.scale=function(b,c){var d=fa(c)?c:b;this.width*=b;this.height*=d;return this};function Kd(b){return b?new Ld(Md(b)):pa||(pa=new Ld)}function Nd(b){var c=document;return ea(b)?c.getElementById(b):b}function Od(b,c){qd(c,function(c,e){"style"==e?b.style.cssText=c:"class"==e?b.className=c:"for"==e?b.htmlFor=c:Pd.hasOwnProperty(e)?b.setAttribute(Pd[e],c):0==e.lastIndexOf("aria-",0)||0==e.lastIndexOf("data-",0)?b.setAttribute(e,c):b[e]=c})}
51
var Pd={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};
52
function Qd(b,c,d){var e=arguments,f=document,g=e[0],h=e[1];if(!Hd&&h&&(h.name||h.type)){g=["<",g];h.name&&g.push(' name="',ra(h.name),'"');if(h.type){g.push(' type="',ra(h.type),'"');var k={};sd(k,h);delete k.type;h=k}g.push(">");g=g.join("")}g=f.createElement(g);h&&(ea(h)?g.className=h:"array"==ca(h)?g.className=h.join(" "):Od(g,h));2<e.length&&Rd(f,g,e);return g}
53
function Rd(b,c,d){function e(d){d&&c.appendChild(ea(d)?b.createTextNode(d):d)}for(var f=2;f<d.length;f++){var g=d[f];!da(g)||ha(g)&&0<g.nodeType?e(g):hd(Sd(g)?id(g):g,e)}}function Td(b){b&&b.parentNode&&b.parentNode.removeChild(b)}function Ud(b,c){var d=c.parentNode;d&&d.replaceChild(b,c)}
54
function Vd(b,c){if(!b||!c)return!1;if(b.contains&&1==c.nodeType)return b==c||b.contains(c);if("undefined"!=typeof b.compareDocumentPosition)return b==c||!!(b.compareDocumentPosition(c)&16);for(;c&&b!=c;)c=c.parentNode;return c==b}function Md(b){return 9==b.nodeType?b:b.ownerDocument||b.document}function Sd(b){if(b&&"number"==typeof b.length){if(ha(b))return"function"==typeof b.item||"string"==typeof b.item;if(ga(b))return"function"==typeof b.item}return!1}
55
function Ld(b){this.a=b||aa.document||document}Ld.prototype.appendChild=function(b,c){b.appendChild(c)};function Wd(b,c,d,e){this.top=b;this.right=c;this.bottom=d;this.left=e}q=Wd.prototype;q.ga=function(){return this.right-this.left};q.clone=function(){return new Wd(this.top,this.right,this.bottom,this.left)};q.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};
56
q.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};q.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};q.scale=function(b,c){var d=fa(c)?c:b;this.left*=b;this.right*=b;this.top*=d;this.bottom*=d;return this};function Xd(b,c){var d=Md(b);return d.defaultView&&d.defaultView.getComputedStyle&&(d=d.defaultView.getComputedStyle(b,null))?d[c]||d.getPropertyValue(c)||"":""}function Yd(b){var c;try{c=b.getBoundingClientRect()}catch(d){return{left:0,top:0,right:0,bottom:0}}ud&&b.ownerDocument.body&&(b=b.ownerDocument,c.left-=b.documentElement.clientLeft+b.body.clientLeft,c.top-=b.documentElement.clientTop+b.body.clientTop);return c}
57
function Zd(b){var c=$d;if("none"!=(Xd(b,"display")||(b.currentStyle?b.currentStyle.display:null)||b.style&&b.style.display))return c(b);var d=b.style,e=d.display,f=d.visibility,g=d.position;d.visibility="hidden";d.position="absolute";d.display="inline";b=c(b);d.display=e;d.position=g;d.visibility=f;return b}function $d(b){var c=b.offsetWidth,d=b.offsetHeight,e=xd&&!c&&!d;return(void 0===c||e)&&b.getBoundingClientRect?(b=Yd(b),new Jd(b.right-b.left,b.bottom-b.top)):new Jd(c,d)}
58
function ae(b,c){b.style.display=c?"":"none"}function be(b,c,d,e){if(/^\d+px?$/.test(c))return parseInt(c,10);var f=b.style[d],g=b.runtimeStyle[d];b.runtimeStyle[d]=b.currentStyle[d];b.style[d]=c;c=b.style[e];b.style[d]=f;b.runtimeStyle[d]=g;return c}function ce(b,c){var d=b.currentStyle?b.currentStyle[c]:null;return d?be(b,d,"left","pixelLeft"):0}var de={thin:2,medium:4,thick:6};
59
function ee(b,c){if("none"==(b.currentStyle?b.currentStyle[c+"Style"]:null))return 0;var d=b.currentStyle?b.currentStyle[c+"Width"]:null;return d in de?de[d]:be(b,d,"left","pixelLeft")};function fe(b,c,d){R.call(this,b);this.map=c;this.frameState=void 0!==d?d:null}H(fe,R);function ge(b){T.call(this);this.element=b.element?b.element:null;this.a=this.w=null;this.h=[];this.render=b.render?b.render:oa;b.target&&(this.w=Nd(b.target))}H(ge,T);ge.prototype.L=function(){Td(this.element);ge.R.L.call(this)};ge.prototype.setMap=function(b){this.a&&Td(this.element);for(var c=0,d=this.h.length;c<d;++c)L(this.h[c]);this.h.length=0;if(this.a=b)(this.w?this.w:b.l).appendChild(this.element),this.render!==oa&&this.h.push(M(b,"postrender",this.render,this)),b.render()};function he(){this.f=0;this.g={};this.b=this.a=null}q=he.prototype;q.clear=function(){this.f=0;this.g={};this.b=this.a=null};function ie(b,c){return b.g.hasOwnProperty(c)}function je(b,c){for(var d=b.a;d;)c.call(void 0,d.Ia,d.Ba,b),d=d.ka}q.get=function(b){b=this.g[b];if(b===this.b)return b.Ia;b===this.a?(this.a=this.a.ka,this.a.Oa=null):(b.ka.Oa=b.Oa,b.Oa.ka=b.ka);b.ka=null;b.Oa=this.b;this.b=this.b.ka=b;return b.Ia};
60
q.pop=function(){var b=this.a;delete this.g[b.Ba];b.ka&&(b.ka.Oa=null);this.a=b.ka;this.a||(this.b=null);--this.f;return b.Ia};q.replace=function(b,c){this.get(b);this.g[b].Ia=c};q.set=function(b,c){var d={Ba:b,ka:null,Oa:this.b,Ia:c};this.b?this.b.ka=d:this.a=d;this.b=d;this.g[b]=d;++this.f};function ke(b){he.call(this);this.c=void 0!==b?b:2048}H(ke,he);function le(b){return b.f>b.c}ke.prototype.Ka=function(b){for(var c,d;le(this);){c=this.a.Ia;d=c.V[0].toString();var e;if(e=d in b)c=c.V,e=$c(b[d],c[1],c[2]);if(e)break;else Wa(this.pop())}};function me(b,c){Ya.call(this);this.V=b;this.state=c;this.a=null;this.key=""}H(me,Ya);function ne(b){S(b,"change")}me.prototype.getKey=function(){return x(this).toString()};me.prototype.I=function(){return this.state};function oe(b,c){if(Array.isArray(b))return b;void 0===c?c=[b,b]:(c[0]=b,c[1]=b);return c};function pe(b){T.call(this);this.c=Vb(b.projection);this.o=qe(b.attributions);this.D=b.logo;this.J=void 0!==b.state?b.state:"ready";this.s=void 0!==b.wrapX?b.wrapX:!1}H(pe,T);function qe(b){if("string"===typeof b)return[new cd({html:b})];if(b instanceof cd)return[b];if(Array.isArray(b)){for(var c=b.length,d=Array(c),e=0;e<c;e++){var f=b[e];d[e]="string"===typeof f?new cd({html:f}):f}return d}return null}pe.prototype.Z=oa;pe.prototype.O=function(){return this.c};pe.prototype.I=function(){return this.J};function re(b){this.minZoom=void 0!==b.minZoom?b.minZoom:0;this.f=b.resolutions;this.maxZoom=this.f.length-1;this.b=void 0!==b.origin?b.origin:null;this.c=null;void 0!==b.origins&&(this.c=b.origins);var c=b.extent;void 0===c||this.b||this.c||(this.b=Kb(c));this.h=null;void 0!==b.tileSizes&&(this.h=b.tileSizes);this.i=void 0!==b.tileSize?b.tileSize:this.h?null:256;this.j=void 0!==c?c:null;this.a=null;this.g=[0,0];void 0!==b.sizes?this.a=b.sizes.map(function(b){return new Zc(Math.min(0,b[0]),Math.max(b[0]-
61
1,-1),Math.min(0,b[1]),Math.max(b[1]-1,-1))},this):c&&se(this,c)}var te=[0,0,0];function ue(b,c,d,e,f){f=ve(b,c,f);for(c=c[0]-1;c>=b.minZoom;){if(d.call(null,c,xe(b,f,c,e)))return!0;--c}return!1}re.prototype.B=function(){return this.j};re.prototype.ua=function(b){return this.b?this.b:this.c[b]};re.prototype.G=function(b){return this.f[b]};function ye(b,c,d,e){return c[0]<b.maxZoom?(e=ve(b,c,e),xe(b,e,c[0]+1,d)):null}
62
function ze(b,c,d,e){Ae(b,c[0],c[1],d,!1,te);var f=te[1],g=te[2];Ae(b,c[2],c[3],d,!0,te);b=te[1];c=te[2];void 0!==e?(e.a=f,e.f=b,e.b=g,e.g=c):e=new Zc(f,b,g,c);return e}function xe(b,c,d,e){d=b.G(d);return ze(b,c,d,e)}function Be(b,c){var d=b.ua(c[0]),e=b.G(c[0]),f=oe(Ce(b,c[0]),b.g);return[d[0]+(c[1]+.5)*f[0]*e,d[1]+(c[2]+.5)*f[1]*e]}function ve(b,c,d){var e=b.ua(c[0]),f=b.G(c[0]);b=oe(Ce(b,c[0]),b.g);var g=e[0]+c[1]*b[0]*f;c=e[1]+c[2]*b[1]*f;return xb(g,c,g+b[0]*f,c+b[1]*f,d)}
63
function Ae(b,c,d,e,f,g){var h=De(b,e),k=e/b.G(h),l=b.ua(h);b=oe(Ce(b,h),b.g);c=k*Math.floor((c-l[0])/e+(f?.5:0))/b[0];d=k*Math.floor((d-l[1])/e+(f?0:.5))/b[1];f?(c=Math.ceil(c)-1,d=Math.ceil(d)-1):(c=Math.floor(c),d=Math.floor(d));f=c;void 0!==g?(g[0]=h,g[1]=f,g[2]=d):g=[h,f,d];return g}function Ee(b,c,d,e){d=b.G(d);return Ae(b,c[0],c[1],d,!1,e)}function Ce(b,c){return b.i?b.i:b.h[c]}function De(b,c,d){c=db(b.f,c,d||0);return Ba(c,b.minZoom,b.maxZoom)}
64
function se(b,c){for(var d=b.f.length,e=Array(d),f=b.minZoom;f<d;++f)e[f]=xe(b,c,f);b.a=e}function Fe(b){var c=b.c;if(!c){for(var c=Ge(b),d=oe(256),d=Math.max(Db(c)/d[0],Eb(c)/d[1]),e=Array(43),f=0;43>f;++f)e[f]=d/Math.pow(2,f);c=new re({extent:c,origin:Kb(c),resolutions:e,tileSize:void 0});b.c=c}return c}function Ge(b){b=Vb(b);var c=b.B();c||(b=180*Rb.degrees/Tb(b),c=xb(-b,-b,b,b));return c};function He(b){pe.call(this,{attributions:b.attributions,extent:b.extent,logo:b.logo,projection:b.projection,state:b.state,wrapX:b.wrapX});this.v=void 0!==b.opaque?b.opaque:!1;this.j=void 0!==b.tilePixelRatio?b.tilePixelRatio:1;this.tileGrid=void 0!==b.tileGrid?b.tileGrid:null;this.a=new ke(b.cacheSize);this.l=[0,0];this.Ba=""}H(He,pe);q=He.prototype;q.sc=function(){return le(this.a)};q.Ka=function(b,c){var d=this.ab(b);d&&d.Ka(c)};
65
function Ie(b,c,d,e,f){c=b.ab(c);if(!c)return!1;for(var g=!0,h,k,l=e.a;l<=e.f;++l)for(var m=e.b;m<=e.g;++m)h=b.jb(d,l,m),k=!1,ie(c,h)&&(h=c.get(h),(k=2===h.I())&&(k=!1!==f(h))),k||(g=!1);return g}q.Fb=function(){return 0};q.getKey=function(){return this.Ba};q.jb=function(b,c,d){return b+"/"+c+"/"+d};q.Hb=function(){return this.v};q.qa=function(b){return this.tileGrid?this.tileGrid:Fe(b)};q.ab=function(b){var c=this.c;return c&&!dc(c,b)?null:this.a};
66
function Je(b,c,d){var e=b.qa(d);d=b.j;c=oe(Ce(e,c),b.l);1==d?b=c:(b=b.l,void 0===b&&(b=[0,0]),b[0]=c[0]*d+.5|0,b[1]=c[1]*d+.5|0);return b}function Ke(b,c,d){var e=void 0!==d?d:b.c;d=b.qa(e);if(b.s&&e.f){var f=c;c=f[0];b=Be(d,f);var e=Ge(e),g=b[0],h=b[1];e[0]<=g&&g<=e[2]&&e[1]<=h&&h<=e[3]?c=f:(f=Db(e),b[0]+=f*Math.ceil((e[0]-b[0])/f),c=Ee(d,b,c))}e=c[0];b=c[1];f=c[2];d=d.minZoom>e||e>d.maxZoom?!1:(d=(g=d.B())?xe(d,g,e):d.a?d.a[e]:null)?$c(d,b,f):!0;return d?c:null}q.zc=oa;
67
function Le(b,c){R.call(this,b);this.tile=c}H(Le,R);function Me(b){b=b?b:{};this.s=document.createElement("UL");this.j=document.createElement("LI");this.s.appendChild(this.j);ae(this.j,!1);this.i=void 0!==b.collapsed?b.collapsed:!0;this.l=void 0!==b.collapsible?b.collapsible:!0;this.l||(this.i=!1);var c=void 0!==b.className?b.className:"ol-attribution",d=void 0!==b.tipLabel?b.tipLabel:"Attributions",e=void 0!==b.collapseLabel?b.collapseLabel:"\u00bb";this.u="string"===typeof e?Qd("SPAN",{},e):e;e=void 0!==b.label?b.label:"i";this.v="string"===typeof e?
68
Qd("SPAN",{},e):e;d=Qd("BUTTON",{type:"button",title:d},this.l&&!this.i?this.u:this.v);M(d,"click",this.J,this);c=Qd("DIV",c+" ol-unselectable ol-control"+(this.i&&this.l?" ol-collapsed":"")+(this.l?"":" ol-uncollapsible"),this.s,d);ge.call(this,{element:c,render:b.render?b.render:Ne,target:b.target});this.o=!0;this.c={};this.b={};this.D={}}H(Me,ge);
69
function Ne(b){if(b=b.frameState){var c,d,e,f,g,h,k,l,m,n,p,r=b.layerStatesArray,t=Ha({},b.attributions),u={},y=b.viewState.projection;d=0;for(c=r.length;d<c;d++)if(h=r[d].layer.T())if(n=x(h).toString(),m=h.o)for(e=0,f=m.length;e<f;e++)if(k=m[e],l=x(k).toString(),!(l in t)){if(g=b.usedTiles[n]){var z=h.qa(y);a:{p=k;var C=y;if(p.a){var v,w,D,E=void 0;for(E in g)if(E in p.a){D=g[E];var G;v=0;for(w=p.a[E].length;v<w;++v){G=p.a[E][v];if(bd(G,D)){p=!0;break a}var F=xe(z,Ge(C),parseInt(E,10)),N=F.ga();
70
if(D.a<F.a||D.f>F.f)if(bd(G,new Zc(Da(D.a,N),Da(D.f,N),D.b,D.g))||D.ga()>N&&bd(G,F)){p=!0;break a}}}p=!1}else p=!0}}else p=!1;p?(l in u&&delete u[l],t[l]=k):u[l]=k}c=[t,u];d=c[0];c=c[1];for(var A in this.c)A in d?(this.b[A]||(ae(this.c[A],!0),this.b[A]=!0),delete d[A]):A in c?(this.b[A]&&(ae(this.c[A],!1),delete this.b[A]),delete c[A]):(Td(this.c[A]),delete this.c[A],delete this.b[A]);for(A in d)e=document.createElement("LI"),e.innerHTML=d[A].b,this.s.appendChild(e),this.c[A]=e,this.b[A]=!0;for(A in c)e=
71
document.createElement("LI"),e.innerHTML=c[A].b,ae(e,!1),this.s.appendChild(e),this.c[A]=e;A=!Ka(this.b)||!Ka(b.logos);this.o!=A&&(ae(this.element,A),this.o=A);A&&Ka(this.b)?this.element.classList.add("ol-logo-only"):this.element.classList.remove("ol-logo-only");var J;b=b.logos;A=this.D;for(J in A)J in b||(Td(A[J]),delete A[J]);for(var P in b)d=b[P],d instanceof HTMLElement&&(this.j.appendChild(d),A[P]=d),P in A||(J=new Image,J.src=P,""===d?d=J:(d=Qd("A",{href:d}),d.appendChild(J)),this.j.appendChild(d),
72
A[P]=d);ae(this.j,!Ka(b))}else this.o&&(ae(this.element,!1),this.o=!1)}Me.prototype.J=function(b){b.preventDefault();this.element.classList.toggle("ol-collapsed");this.i?Ud(this.u,this.v):Ud(this.v,this.u);this.i=!this.i};function Oe(b){b=b?b:{};var c=void 0!==b.className?b.className:"ol-rotate",d=void 0!==b.label?b.label:"\u21e7";this.b=null;"string"===typeof d?this.b=Qd("SPAN","ol-compass",d):(this.b=d,this.b.classList.add("ol-compass"));d=Qd("BUTTON",{"class":c+"-reset",type:"button",title:b.tipLabel?b.tipLabel:"Reset rotation"},this.b);M(d,"click",Oe.prototype.o,this);c=Qd("DIV",c+" ol-unselectable ol-control",d);d=b.render?b.render:Pe;this.i=b.resetNorth?b.resetNorth:void 0;ge.call(this,{element:c,render:d,target:b.target});
73
this.j=void 0!==b.duration?b.duration:250;this.c=void 0!==b.autoHide?b.autoHide:!0;this.l=void 0;this.c&&this.element.classList.add("ol-hidden")}H(Oe,ge);Oe.prototype.o=function(b){b.preventDefault();if(void 0!==this.i)this.i();else{b=this.a;var c=b.C();if(c){var d=c.N();void 0!==d&&(0<this.j&&(d%=2*Math.PI,d<-Math.PI&&(d+=2*Math.PI),d>Math.PI&&(d-=2*Math.PI),b.ea(Xc({rotation:d,duration:this.j,easing:Tc}))),c.set("rotation",0))}}};
74
function Pe(b){if(b=b.frameState){b=b.viewState.rotation;if(b!=this.l){var c="rotate("+b+"rad)";if(this.c){var d=this.element.classList.contains("ol-hidden");d||0!==b?d&&0!==b&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")}this.b.style.msTransform=c;this.b.style.webkitTransform=c;this.b.style.transform=c}this.l=b}};function Qe(b){b=b?b:{};var c=void 0!==b.className?b.className:"ol-zoom",d=void 0!==b.delta?b.delta:1,e=void 0!==b.zoomOutLabel?b.zoomOutLabel:"\u2212",f=void 0!==b.zoomOutTipLabel?b.zoomOutTipLabel:"Zoom out",g=Qd("BUTTON",{"class":c+"-in",type:"button",title:void 0!==b.zoomInTipLabel?b.zoomInTipLabel:"Zoom in"},void 0!==b.zoomInLabel?b.zoomInLabel:"+");M(g,"click",Qe.prototype.c.bind(this,d));e=Qd("BUTTON",{"class":c+"-out",type:"button",title:f},e);M(e,"click",Qe.prototype.c.bind(this,-d));c=Qd("DIV",
75
c+" ol-unselectable ol-control",g,e);ge.call(this,{element:c,target:b.target});this.b=void 0!==b.duration?b.duration:250}H(Qe,ge);Qe.prototype.c=function(b,c){c.preventDefault();var d=this.a,e=d.C();if(e){var f=e.G();f&&(0<this.b&&d.ea(Yc({resolution:f,duration:this.b,easing:Tc})),d=e.constrainResolution(f,b),e.Pa(d))}};function Re(b){b=b?b:{};var c=document.createElement("DIV");c.className=void 0!==b.className?b.className:"ol-mouse-position";ge.call(this,{element:c,render:b.render?b.render:Se,target:b.target});M(this,U("projection"),this.s,this);b.coordinateFormat&&this.set("coordinateFormat",b.coordinateFormat);if(b.projection){var d=Vb(b.projection);this.set("projection",d)}this.u=void 0!==b.undefinedHTML?b.undefinedHTML:"";this.j=c.innerHTML;this.i=this.c=this.b=null}H(Re,ge);
76
function Se(b){b=b.frameState;b?this.b!=b.viewState.projection&&(this.b=b.viewState.projection,this.c=null):this.b=null;Te(this,this.i)}Re.prototype.s=function(){this.c=null};Re.prototype.l=function(b){this.i=Ue(this.a,b);Te(this,this.i)};Re.prototype.o=function(){Te(this,null);this.i=null};Re.prototype.setMap=function(b){Re.R.setMap.call(this,b);b&&(b=b.a,this.h.push(M(b,"mousemove",this.l,this),M(b,"mouseout",this.o,this)))};
77
function Te(b,c){var d=b.u;if(c&&b.b){if(!b.c){var e=b.get("projection");b.c=e?Ub(b.b,e):fc}if(e=b.a.pa(c))b.c(e,e),d=(d=b.get("coordinateFormat"))?d(e):e.toString()}b.j&&d==b.j||(b.element.innerHTML=d,b.j=d)};var Ve;
78
function We(){var b=aa.MessageChannel;"undefined"===typeof b&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!pd("Presto")&&(b=function(){var b=document.createElement("IFRAME");b.style.display="none";b.src="";document.documentElement.appendChild(b);var c=b.contentWindow,b=c.document;b.open();b.write("");b.close();var d="callImmediate"+Math.random(),e="file:"==c.location.protocol?"*":c.location.protocol+"//"+c.location.host,b=ma(function(b){if(("*"==e||b.origin==e)&&b.data==
79
d)this.port1.onmessage()},this);c.addEventListener("message",b,!1);this.port1={};this.port2={postMessage:function(){c.postMessage(d,e)}}});if("undefined"!==typeof b&&!pd("Trident")&&!pd("MSIE")){var c=new b,d={},e=d;c.port1.onmessage=function(){if(void 0!==d.next){d=d.next;var b=d.Yb;d.Yb=null;b()}};return function(b){e.next={Yb:b};e=e.next;c.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(b){var c=document.createElement("SCRIPT");
80
c.onreadystatechange=function(){c.onreadystatechange=null;c.parentNode.removeChild(c);c=null;b();b=null};document.documentElement.appendChild(c)}:function(b){aa.setTimeout(b,0)}};function Xe(b,c,d){R.call(this,b);this.a=c;b=d?d:{};this.buttons=Ye(b);this.pressure=Ze(b,this.buttons);this.bubbles="bubbles"in b?b.bubbles:!1;this.cancelable="cancelable"in b?b.cancelable:!1;this.view="view"in b?b.view:null;this.detail="detail"in b?b.detail:null;this.screenX="screenX"in b?b.screenX:0;this.screenY="screenY"in b?b.screenY:0;this.clientX="clientX"in b?b.clientX:0;this.clientY="clientY"in b?b.clientY:0;this.button="button"in b?b.button:0;this.relatedTarget="relatedTarget"in b?b.relatedTarget:
81
null;this.pointerId="pointerId"in b?b.pointerId:0;this.width="width"in b?b.width:0;this.height="height"in b?b.height:0;this.pointerType="pointerType"in b?b.pointerType:"";this.isPrimary="isPrimary"in b?b.isPrimary:!1;c.preventDefault&&(this.preventDefault=function(){c.preventDefault()})}H(Xe,R);function Ye(b){if(b.buttons||$e)b=b.buttons;else switch(b.which){case 1:b=1;break;case 2:b=4;break;case 3:b=2;break;default:b=0}return b}function Ze(b,c){var d=0;b.pressure?d=b.pressure:d=c?.5:0;return d}
82
var $e=!1;try{$e=1===(new MouseEvent("click",{buttons:1})).buttons}catch(b){};function af(b,c){var d=document.createElement("CANVAS");b&&(d.width=b);c&&(d.height=c);return d.getContext("2d")};var bf=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function cf(b,c){var d,e,f=bf.length;for(e=0;e<f;++e)try{if(d=b.getContext(bf[e],c))return d}catch(g){}return null};var df,ef="undefined"!==typeof navigator?navigator.userAgent.toLowerCase():"",ff=-1!==ef.indexOf("firefox"),gf=-1!==ef.indexOf("safari")&&-1===ef.indexOf("chrom"),hf=-1!==ef.indexOf("macintosh"),jf=I.devicePixelRatio||1,kf=!1,lf=function(){if(!("HTMLCanvasElement"in I))return!1;try{var b=af();return b?(void 0!==b.setLineDash&&(kf=!0),!0):!1}catch(c){return!1}}(),mf="ontouchstart"in I,nf="PointerEvent"in I,of=!!I.navigator.msPointerEnabled,pf=!1,qf=[];
0 ignored issues
show
Coding Style Comprehensibility Best Practice introduced by
Empty catch clauses should be used with caution; consider adding a comment why this is needed.
Loading history...
83
if("WebGLRenderingContext"in I)try{var rf=cf(document.createElement("CANVAS"),{failIfMajorPerformanceCaveat:!0});rf&&(pf=!0,qf=rf.getSupportedExtensions())}catch(b){}df=pf;na=qf;function sf(b,c){this.a=b;this.c=c};function tf(b){sf.call(this,b,{mousedown:this.td,mousemove:this.ud,mouseup:this.xd,mouseover:this.wd,mouseout:this.vd});this.b=b.b;this.f=[]}H(tf,sf);function uf(b,c){for(var d=b.f,e=c.clientX,f=c.clientY,g=0,h=d.length,k;g<h&&(k=d[g]);g++){var l=Math.abs(f-k[1]);if(25>=Math.abs(e-k[0])&&25>=l)return!0}return!1}function vf(b){var c=wf(b,b),d=c.preventDefault;c.preventDefault=function(){b.preventDefault();d()};c.pointerId=1;c.isPrimary=!0;c.pointerType="mouse";return c}q=tf.prototype;
0 ignored issues
show
Coding Style Comprehensibility Best Practice introduced by
Empty catch clauses should be used with caution; consider adding a comment why this is needed.
Loading history...
84
q.td=function(b){if(!uf(this,b)){if((1).toString()in this.b){var c=vf(b);xf(this.a,yf,c,b);delete this.b[(1).toString()]}c=vf(b);this.b[(1).toString()]=b;xf(this.a,zf,c,b)}};q.ud=function(b){if(!uf(this,b)){var c=vf(b);xf(this.a,Af,c,b)}};q.xd=function(b){if(!uf(this,b)){var c=this.b[(1).toString()];c&&c.button===b.button&&(c=vf(b),xf(this.a,Bf,c,b),delete this.b[(1).toString()])}};q.wd=function(b){if(!uf(this,b)){var c=vf(b);Cf(this.a,c,b)}};
85
q.vd=function(b){if(!uf(this,b)){var c=vf(b);Df(this.a,c,b)}};function Ef(b){sf.call(this,b,{MSPointerDown:this.Cd,MSPointerMove:this.Dd,MSPointerUp:this.Gd,MSPointerOut:this.Ed,MSPointerOver:this.Fd,MSPointerCancel:this.Bd,MSGotPointerCapture:this.zd,MSLostPointerCapture:this.Ad});this.b=b.b;this.f=["","unavailable","touch","pen","mouse"]}H(Ef,sf);function Ff(b,c){var d=c;fa(c.pointerType)&&(d=wf(c,c),d.pointerType=b.f[c.pointerType]);return d}q=Ef.prototype;q.Cd=function(b){this.b[b.pointerId.toString()]=b;var c=Ff(this,b);xf(this.a,zf,c,b)};
86
q.Dd=function(b){var c=Ff(this,b);xf(this.a,Af,c,b)};q.Gd=function(b){var c=Ff(this,b);xf(this.a,Bf,c,b);delete this.b[b.pointerId.toString()]};q.Ed=function(b){var c=Ff(this,b);Df(this.a,c,b)};q.Fd=function(b){var c=Ff(this,b);Cf(this.a,c,b)};q.Bd=function(b){var c=Ff(this,b);xf(this.a,yf,c,b);delete this.b[b.pointerId.toString()]};q.Ad=function(b){S(this.a,new Xe("lostpointercapture",b,b))};q.zd=function(b){S(this.a,new Xe("gotpointercapture",b,b))};function Gf(b){sf.call(this,b,{pointerdown:this.Ud,pointermove:this.Vd,pointerup:this.Yd,pointerout:this.Wd,pointerover:this.Xd,pointercancel:this.Td,gotpointercapture:this.Wc,lostpointercapture:this.sd})}H(Gf,sf);q=Gf.prototype;q.Ud=function(b){Hf(this.a,b)};q.Vd=function(b){Hf(this.a,b)};q.Yd=function(b){Hf(this.a,b)};q.Wd=function(b){Hf(this.a,b)};q.Xd=function(b){Hf(this.a,b)};q.Td=function(b){Hf(this.a,b)};q.sd=function(b){Hf(this.a,b)};q.Wc=function(b){Hf(this.a,b)};function If(b,c){sf.call(this,b,{touchstart:this.le,touchmove:this.ke,touchend:this.je,touchcancel:this.ie});this.b=b.b;this.i=c;this.f=void 0;this.h=0;this.g=void 0}H(If,sf);q=If.prototype;q.wc=function(){this.h=0;this.g=void 0};
87
function Jf(b,c,d){c=wf(c,d);c.pointerId=d.identifier+2;c.bubbles=!0;c.cancelable=!0;c.detail=b.h;c.button=0;c.buttons=1;c.width=d.webkitRadiusX||d.radiusX||0;c.height=d.webkitRadiusY||d.radiusY||0;c.pressure=d.webkitForce||d.force||.5;c.isPrimary=b.f===d.identifier;c.pointerType="touch";c.clientX=d.clientX;c.clientY=d.clientY;c.screenX=d.screenX;c.screenY=d.screenY;return c}
88
function Kf(b,c,d){function e(){c.preventDefault()}var f=Array.prototype.slice.call(c.changedTouches),g=f.length,h,k;for(h=0;h<g;++h)k=Jf(b,c,f[h]),k.preventDefault=e,d.call(b,c,k)}
89
q.le=function(b){var c=b.touches,d=Object.keys(this.b),e=d.length;if(e>=c.length){var f=[],g,h,k;for(g=0;g<e;++g){h=d[g];k=this.b[h];var l;if(!(l=1==h))a:{l=c.length;for(var m,n=0;n<l;n++)if(m=c[n],m.identifier===h-2){l=!0;break a}l=!1}l||f.push(k.out)}for(g=0;g<f.length;++g)this.Ab(b,f[g])}c=b.changedTouches[0];d=Object.keys(this.b).length;if(0===d||1===d&&(1).toString()in this.b)this.f=c.identifier,void 0!==this.g&&I.clearTimeout(this.g);Lf(this,b);this.h++;Kf(this,b,this.Sd)};
90
q.Sd=function(b,c){this.b[c.pointerId]={target:c.target,out:c,tc:c.target};var d=this.a;c.bubbles=!0;xf(d,Mf,c,b);d=this.a;c.bubbles=!1;xf(d,Nf,c,b);xf(this.a,zf,c,b)};q.ke=function(b){b.preventDefault();Kf(this,b,this.yd)};q.yd=function(b,c){var d=this.b[c.pointerId];if(d){var e=d.out,f=d.tc;xf(this.a,Af,c,b);e&&f!==c.target&&(e.relatedTarget=c.target,c.relatedTarget=f,e.target=f,c.target?(Df(this.a,e,b),Cf(this.a,c,b)):(c.target=f,c.relatedTarget=null,this.Ab(b,c)));d.out=c;d.tc=c.target}};
91
q.je=function(b){Lf(this,b);Kf(this,b,this.ne)};q.ne=function(b,c){xf(this.a,Bf,c,b);this.a.out(c,b);var d=this.a;c.bubbles=!1;xf(d,Of,c,b);delete this.b[c.pointerId];c.isPrimary&&(this.f=void 0,this.g=I.setTimeout(this.wc.bind(this),200))};q.ie=function(b){Kf(this,b,this.Ab)};q.Ab=function(b,c){xf(this.a,yf,c,b);this.a.out(c,b);var d=this.a;c.bubbles=!1;xf(d,Of,c,b);delete this.b[c.pointerId];c.isPrimary&&(this.f=void 0,this.g=I.setTimeout(this.wc.bind(this),200))};
92
function Lf(b,c){var d=b.i.f,e=c.changedTouches[0];if(b.f===e.identifier){var f=[e.clientX,e.clientY];d.push(f);I.setTimeout(function(){fb(d,f)},2500)}};function Pf(b){Ya.call(this);this.c=b;this.b={};this.g={};this.a=[];nf?Qf(this,new Gf(this)):of?Qf(this,new Ef(this)):(b=new tf(this),Qf(this,b),mf&&Qf(this,new If(this,b)));b=this.a.length;for(var c,d=0;d<b;d++)c=this.a[d],Rf(this,Object.keys(c.c))}H(Pf,Ya);function Qf(b,c){var d=Object.keys(c.c);d&&(d.forEach(function(b){var d=c.c[b];d&&(this.g[b]=d.bind(c))},b),b.a.push(c))}Pf.prototype.f=function(b){var c=this.g[b.type];c&&c(b)};
93
function Rf(b,c){c.forEach(function(b){M(this.c,b,this.f,this)},b)}function Sf(b,c){c.forEach(function(b){Ta(this.c,b,this.f,this)},b)}function wf(b,c){for(var d={},e,f=0,g=Tf.length;f<g;f++)e=Tf[f][0],d[e]=b[e]||c[e]||Tf[f][1];return d}Pf.prototype.out=function(b,c){b.bubbles=!0;xf(this,Uf,b,c)};function Df(b,c,d){b.out(c,d);var e=c.relatedTarget;e&&Vd(c.target,e)||(c.bubbles=!1,xf(b,Of,c,d))}
94
function Cf(b,c,d){c.bubbles=!0;xf(b,Mf,c,d);var e=c.relatedTarget;e&&Vd(c.target,e)||(c.bubbles=!1,xf(b,Nf,c,d))}function xf(b,c,d,e){S(b,new Xe(c,e,d))}function Hf(b,c){S(b,new Xe(c.type,c,c))}Pf.prototype.L=function(){for(var b=this.a.length,c,d=0;d<b;d++)c=this.a[d],Sf(this,Object.keys(c.c));Pf.R.L.call(this)};
95
var Af="pointermove",zf="pointerdown",Bf="pointerup",Mf="pointerover",Uf="pointerout",Nf="pointerenter",Of="pointerleave",yf="pointercancel",Tf=[["bubbles",!1],["cancelable",!1],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",!1],["altKey",!1],["shiftKey",!1],["metaKey",!1],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",
96
!1],["type",""],["target",null],["currentTarget",null],["which",0]];function Vf(b,c,d,e,f){fe.call(this,b,c,f);this.originalEvent=d;this.pixel=Ue(c,d);this.coordinate=c.pa(this.pixel);this.dragging=void 0!==e?e:!1}H(Vf,fe);Vf.prototype.preventDefault=function(){Vf.R.preventDefault.call(this);this.originalEvent.preventDefault()};Vf.prototype.stopPropagation=function(){Vf.R.stopPropagation.call(this);this.originalEvent.stopPropagation()};function Wf(b,c,d,e,f){Vf.call(this,b,c,d.a,e,f);this.a=d}H(Wf,Vf);
97
function Xf(b){Ya.call(this);this.f=b;this.h=0;this.i=!1;this.g=[];this.b=null;b=this.f.a;this.s=0;this.o={};this.c=new Pf(b);this.a=null;this.j=M(this.c,zf,this.hd,this);this.l=M(this.c,Af,this.$d,this)}H(Xf,Ya);function Yf(b,c){var d;d=new Wf(Zf,b.f,c);S(b,d);0!==b.h?(I.clearTimeout(b.h),b.h=0,d=new Wf($f,b.f,c),S(b,d)):b.h=I.setTimeout(function(){this.h=0;var b=new Wf(ag,this.f,c);S(this,b)}.bind(b),250)}
98
function bg(b,c){c.type==cg||c.type==dg?delete b.o[c.pointerId]:c.type==eg&&(b.o[c.pointerId]=!0);b.s=Object.keys(b.o).length}q=Xf.prototype;q.lc=function(b){bg(this,b);var c=new Wf(cg,this.f,b);S(this,c);!this.i&&0===b.button&&Yf(this,this.b);0===this.s&&(this.g.forEach(L),this.g.length=0,this.i=!1,this.b=null,Wa(this.a),this.a=null)};
99
q.hd=function(b){bg(this,b);var c=new Wf(eg,this.f,b);S(this,c);this.b=b;0===this.g.length&&(this.a=new Pf(document),this.g.push(M(this.a,fg,this.Kd,this),M(this.a,cg,this.lc,this),M(this.c,dg,this.lc,this)))};q.Kd=function(b){if(b.clientX!=this.b.clientX||b.clientY!=this.b.clientY){this.i=!0;var c=new Wf(gg,this.f,b,this.i);S(this,c)}b.preventDefault()};q.$d=function(b){S(this,new Wf(b.type,this.f,b,!(!this.b||b.clientX==this.b.clientX&&b.clientY==this.b.clientY)))};
100
q.L=function(){this.l&&(L(this.l),this.l=null);this.j&&(L(this.j),this.j=null);this.g.forEach(L);this.g.length=0;this.a&&(Wa(this.a),this.a=null);this.c&&(Wa(this.c),this.c=null);Xf.R.L.call(this)};var ag="singleclick",Zf="click",$f="dblclick",gg="pointerdrag",fg="pointermove",eg="pointerdown",cg="pointerup",dg="pointercancel",hg={ze:ag,oe:Zf,pe:$f,se:gg,ve:fg,re:eg,ye:cg,xe:"pointerover",we:"pointerout",te:"pointerenter",ue:"pointerleave",qe:dg};function ig(b){T.call(this);var c=Ha({},b);c.opacity=void 0!==b.opacity?b.opacity:1;c.visible=void 0!==b.visible?b.visible:!0;c.zIndex=void 0!==b.zIndex?b.zIndex:0;c.maxResolution=void 0!==b.maxResolution?b.maxResolution:Infinity;c.minResolution=void 0!==b.minResolution?b.minResolution:0;this.F(c)}H(ig,T);
101
function jg(b){var c=b.get("opacity"),d=b.Ib(),e=b.get("visible"),f=b.B(),g=b.get("zIndex"),h=b.get("maxResolution"),k=b.get("minResolution");return{layer:b,opacity:Ba(c,0,1),xc:d,visible:e,nb:!0,extent:f,zIndex:g,maxResolution:h,minResolution:Math.max(k,0)}}ig.prototype.B=function(){return this.get("extent")};function kg(){};function lg(b,c,d,e,f,g){R.call(this,b,c);this.vectorContext=d;this.frameState=e;this.context=f;this.glContext=g}H(lg,R);function mg(b){var c=Ha({},b);delete c.source;ig.call(this,c);this.h=this.b=this.a=null;b.map&&this.setMap(b.map);M(this,U("source"),this.nd,this);this.set("source",b.source?b.source:null)}H(mg,ig);function ng(b,c){return b.visible&&c>=b.minResolution&&c<b.maxResolution}q=mg.prototype;q.Gb=function(b){b=b?b:[];b.push(jg(this));return b};q.T=function(){return this.get("source")||null};q.Ib=function(){var b=this.T();return b?b.I():"undefined"};q.Ld=function(){this.f()};
102
q.nd=function(){this.h&&(L(this.h),this.h=null);var b=this.T();b&&(this.h=M(b,"change",this.Ld,this));this.f()};q.setMap=function(b){this.a&&(L(this.a),this.a=null);b||this.f();this.b&&(L(this.b),this.b=null);b&&(this.a=M(b,"precompose",function(b){var d=jg(this);d.nb=!1;d.zIndex=Infinity;b.frameState.layerStatesArray.push(d);b.frameState.layerStates[x(this)]=d},this),this.b=M(this,"change",b.render,b),this.f())};function og(b,c,d,e,f){Ya.call(this);this.c=f;this.extent=b;this.h=d;this.resolution=c;this.state=e}H(og,Ya);function pg(b){S(b,"change")}og.prototype.B=function(){return this.extent};og.prototype.G=function(){return this.resolution};og.prototype.I=function(){return this.state};function qg(b,c,d,e,f,g,h,k){nc(b);0===c&&0===d||pc(b,c,d);1==e&&1==f||qc(b,e,f);0!==g&&rc(b,g);0===h&&0===k||pc(b,h,k);return b}function rg(b,c,d){var e=b[1],f=b[5],g=b[13],h=c[0];c=c[1];d[0]=b[0]*h+b[4]*c+b[12];d[1]=e*h+f*c+g;return d};function sg(b){$a.call(this);this.a=b}H(sg,$a);sg.prototype.Z=oa;sg.prototype.l=function(b,c,d){return function(e,f){return Ie(b,c,e,f,function(b){d[e]||(d[e]={});d[e][b.V.toString()]=b})}};sg.prototype.P=function(b){2===b.target.I()&&tg(this)};function ug(b,c){var d=c.I();2!=d&&3!=d&&M(c,"change",b.P,b);0==d&&(c.load(),d=c.I());return 2==d}function tg(b){var c=b.a;c.get("visible")&&"ready"==c.Ib()&&b.f()}
103
function vg(b,c){c.sc()&&b.postRenderFunctions.push(function(b,c,f){c=x(b).toString();b.Ka(f.viewState.projection,f.usedTiles[c])}.bind(null,c))}function wg(b,c){if(c){var d,e,f;e=0;for(f=c.length;e<f;++e)d=c[e],b[x(d).toString()]=d}}function xg(b,c){var d=c.D;void 0!==d&&("string"===typeof d?b.logos[d]="":ha(d)&&(b.logos[d.src]=d.href))}
104
function yg(b,c,d,e){c=x(c).toString();d=d.toString();c in b?d in b[c]?(b=b[c][d],e.a<b.a&&(b.a=e.a),e.f>b.f&&(b.f=e.f),e.b<b.b&&(b.b=e.b),e.g>b.g&&(b.g=e.g)):b[c][d]=e:(b[c]={},b[c][d]=e)}function zg(b,c,d){return[c*(Math.round(b[0]/c)+d[0]%2/2),c*(Math.round(b[1]/c)+d[1]%2/2)]}
105
function Ag(b,c,d,e,f,g,h,k,l,m){var n=x(c).toString();n in b.wantedTiles||(b.wantedTiles[n]={});var p=b.wantedTiles[n];b=b.tileQueue;var r=d.minZoom,t,u,y,z,C,v;for(v=h;v>=r;--v)for(u=xe(d,g,v,u),y=d.G(v),z=u.a;z<=u.f;++z)for(C=u.b;C<=u.g;++C)h-v<=k?(t=Bg(c,v,z,C,e,f),0==t.I()&&(p[t.V.toString()]=!0,t.getKey()in b.f||b.g([t,n,Be(d,t.V),y])),void 0!==l&&l.call(m,t)):c.zc(v,z,C,f)};function Cg(b){this.l=b.opacity;this.A=b.rotateWithView;this.F=b.rotation;this.bb=b.scale;this.s=b.snapToPixel}Cg.prototype.N=function(){return this.F};function Dg(){this.a={};this.b=0}ba(Dg);Dg.prototype.clear=function(){this.a={};this.b=0};Dg.prototype.get=function(b,c,d){b=c+":"+b+":"+(d?kd(d):"null");return b in this.a?this.a[b]:null};Dg.prototype.set=function(b,c,d,e){this.a[c+":"+b+":"+(d?kd(d):"null")]=e;++this.b};function Eg(b,c){this.j=c;this.f={};this.A={}}H(Eg,Va);function Fg(b){var c=b.viewState,d=b.coordinateToPixelMatrix;qg(d,b.size[0]/2,b.size[1]/2,1/c.resolution,-1/c.resolution,-c.rotation,-c.center[0],-c.center[1]);oc(d,b.pixelToCoordinateMatrix)}q=Eg.prototype;q.L=function(){for(var b in this.f)Wa(this.f[b])};function Gg(){var b=Dg.za();if(32<b.b){var c=0,d,e;for(d in b.a)e=b.a[d],0!==(c++&3)||Za(e)||(delete b.a[d],--b.b)}}
106
q.Z=function(b,c,d,e,f,g){function h(b,f){var g=x(b).toString(),h=c.layerStates[x(f)].nb;if(!(g in c.skippedFeatureUids)||h)return d.call(e,b,h?f:null)}var k,l=c.viewState,m=l.resolution,n=l.projection,l=b;if(n.b){var n=n.B(),p=Db(n),r=b[0];if(r<n[0]||r>n[2])l=[r+p*Math.ceil((n[0]-r)/p),b[1]]}n=c.layerStatesArray;for(p=n.length-1;0<=p;--p){var t=n[p],r=t.layer;if(ng(t,m)&&f.call(g,r)&&(t=Hg(this,r),r.T()&&(k=t.Z(r.T().s?l:b,c,h,e)),k))return k}};
0 ignored issues
show
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Complexity Best Practice introduced by
There is no return statement if !(g in c.skippedFeatureUids) || h is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
107
function Hg(b,c){var d=x(c).toString();if(d in b.f)return b.f[d];var e=b.Zb(c);b.f[d]=e;b.A[d]=M(e,"change",b.bd,b);return e}q.bd=function(){this.j.render()};q.Mb=oa;q.ce=function(b,c){for(var d in this.f)if(!(c&&d in c.layerStates)){var e=d,f=this.f[e];delete this.f[e];L(this.A[e]);delete this.A[e];Wa(f)}};function Ig(b,c){for(var d in b.f)if(!(d in c.layerStates)){c.postRenderFunctions.push(b.ce.bind(b));break}}function ib(b,c){return b.zIndex-c.zIndex};function Jg(b,c){this.l=b;this.i=c;this.a=[];this.b=[];this.f={}}Jg.prototype.clear=function(){this.a.length=0;this.b.length=0;Ia(this.f)};function Kg(b){var c=b.a,d=b.b,e=c[0];1==c.length?(c.length=0,d.length=0):(c[0]=c.pop(),d[0]=d.pop(),Lg(b,0));c=b.i(e);delete b.f[c];return e}Jg.prototype.g=function(b){var c=this.l(b);return Infinity!=c?(this.a.push(b),this.b.push(c),this.f[this.i(b)]=!0,Mg(this,0,this.a.length-1),!0):!1};
108
function Lg(b,c){for(var d=b.a,e=b.b,f=d.length,g=d[c],h=e[c],k=c;c<f>>1;){var l=2*c+1,m=2*c+2,l=m<f&&e[m]<e[l]?m:l;d[c]=d[l];e[c]=e[l];c=l}d[c]=g;e[c]=h;Mg(b,k,c)}function Mg(b,c,d){var e=b.a;b=b.b;for(var f=e[d],g=b[d];d>c;){var h=d-1>>1;if(b[h]>g)e[d]=e[h],b[d]=b[h],d=h;else break}e[d]=f;b[d]=g}function Ng(b){var c=b.l,d=b.a,e=b.b,f=0,g=d.length,h,k,l;for(k=0;k<g;++k)h=d[k],l=c(h),Infinity==l?delete b.f[b.i(h)]:(e[f]=l,d[f++]=h);d.length=f;e.length=f;for(c=(b.a.length>>1)-1;0<=c;c--)Lg(b,c)};function Og(b,c){Jg.call(this,function(c){return b.apply(null,c)},function(b){return b[0].getKey()});this.A=c;this.h=0;this.c={}}H(Og,Jg);Og.prototype.g=function(b){var c=Og.R.g.call(this,b);c&&M(b[0],"change",this.j,this);return c};Og.prototype.j=function(b){b=b.target;var c=b.I();if(2===c||3===c||4===c||5===c)Ta(b,"change",this.j,this),b=b.getKey(),b in this.c&&(delete this.c[b],--this.h),this.A()};function Pg(){this.a=[];this.b=this.f=0}function Qg(b,c){var d=b.b,e=.05-d,f=Math.log(.05/b.b)/-.005;return Wc({source:c,duration:f,easing:function(b){return d*(Math.exp(-.005*b*f)-1)/e}})};function Rg(b){T.call(this);this.P=null;this.set("active",!0);this.handleEvent=b.handleEvent}H(Rg,T);Rg.prototype.setMap=function(b){this.P=b};function Sg(b,c,d,e,f){if(void 0!==d){var g=c.N(),h=c.aa();void 0!==g&&h&&f&&0<f&&(b.ea(Xc({rotation:g,duration:f,easing:Tc})),e&&b.ea(Wc({source:h,duration:f,easing:Tc})));c.rotate(d,e)}}function Tg(b,c,d,e,f){var g=c.G();d=c.constrainResolution(g,d,0);Ug(b,c,d,e,f)}
109
function Ug(b,c,d,e,f){if(d){var g=c.G(),h=c.aa();void 0!==g&&h&&d!==g&&f&&0<f&&(b.ea(Yc({resolution:g,duration:f,easing:Tc})),e&&b.ea(Wc({source:h,duration:f,easing:Tc})));if(e){var k;b=c.aa();f=c.G();void 0!==b&&void 0!==f&&(k=[e[0]-d*(e[0]-b[0])/f,e[1]-d*(e[1]-b[1])/f]);c.la(k)}c.Pa(d)}};function Vg(b){b=b?b:{};this.a=b.delta?b.delta:1;Rg.call(this,{handleEvent:Wg});this.b=void 0!==b.duration?b.duration:250}H(Vg,Rg);function Wg(b){var c=!1,d=b.originalEvent;if(b.type==$f){var c=b.map,e=b.coordinate,d=d.shiftKey?-this.a:this.a,f=c.C();Tg(c,f,d,e,this.b);b.preventDefault();c=!0}return!c};function Xg(b){b=b.originalEvent;return b.altKey&&!(b.metaKey||b.ctrlKey)&&b.shiftKey}function Yg(b){b=b.originalEvent;return 0==b.button&&!(xd&&hf&&b.ctrlKey)}function Zg(b){b=b.originalEvent;return!b.altKey&&!(b.metaKey||b.ctrlKey)&&!b.shiftKey}function $g(b){b=b.originalEvent;return!b.altKey&&!(b.metaKey||b.ctrlKey)&&b.shiftKey}function ah(b){b=b.originalEvent.target.tagName;return"INPUT"!==b&&"SELECT"!==b&&"TEXTAREA"!==b}function bh(b){return"mouse"==b.a.pointerType};function ch(b){b=b?b:{};Rg.call(this,{handleEvent:b.handleEvent?b.handleEvent:dh});this.ub=b.handleDownEvent?b.handleDownEvent:Nb;this.vb=b.handleDragEvent?b.handleDragEvent:oa;this.wb=b.handleMoveEvent?b.handleMoveEvent:oa;this.sb=b.handleUpEvent?b.handleUpEvent:Nb;this.s=!1;this.J={};this.c=[]}H(ch,Rg);function eh(b){for(var c=b.length,d=0,e=0,f=0;f<c;f++)d+=b[f].clientX,e+=b[f].clientY;return[d/c,e/c]}
110
function dh(b){if(!(b instanceof Wf))return!0;var c=!1,d=b.type;if(d===eg||d===gg||d===cg)d=b.a,b.type==cg?delete this.J[d.pointerId]:b.type==eg?this.J[d.pointerId]=d:d.pointerId in this.J&&(this.J[d.pointerId]=d),this.c=Ja(this.J);this.s&&(b.type==gg?this.vb(b):b.type==cg&&(this.s=this.sb(b)));b.type==eg?(this.s=b=this.ub(b),c=this.v(b)):b.type==fg&&this.wb(b);return!c}ch.prototype.v=function(b){return b};function fh(b){ch.call(this,{handleDownEvent:gh,handleDragEvent:hh,handleUpEvent:ih});b=b?b:{};this.a=b.kinetic;this.b=this.h=null;this.j=b.condition?b.condition:Zg;this.i=!1}H(fh,ch);function hh(b){var c=eh(this.c);this.a&&this.a.a.push(c[0],c[1],Date.now());if(this.b){var d=this.b[0]-c[0],e=c[1]-this.b[1];b=b.map;var f=b.C(),g=f.I(),e=d=[d,e],h=g.resolution;e[0]*=h;e[1]*=h;qb(d,g.rotation);pb(d,g.center);d=f.a.center(d);b.render();f.la(d)}this.b=c}
111
function ih(b){b=b.map;var c=b.C();if(0===this.c.length){var d;if(d=!this.i&&this.a)if(d=this.a,6>d.a.length)d=!1;else{var e=Date.now()-100,f=d.a.length-3;if(d.a[f+2]<e)d=!1;else{for(var g=f-3;0<g&&d.a[g+2]>e;)g-=3;var e=d.a[f+2]-d.a[g+2],h=d.a[f]-d.a[g],f=d.a[f+1]-d.a[g+1];d.f=Math.atan2(f,h);d.b=Math.sqrt(h*h+f*f)/e;d=.05<d.b}}d&&(d=(.05-this.a.b)/-.005,f=this.a.f,g=c.aa(),this.h=Qg(this.a,g),b.ea(this.h),g=jh(b,g),d=b.pa([g[0]-d*Math.cos(f),g[1]-d*Math.sin(f)]),d=c.a.center(d),c.la(d));Sc(c,-1);
112
b.render();return!1}this.b=null;return!0}function gh(b){if(0<this.c.length&&this.j(b)){var c=b.map,d=c.C();this.b=null;this.s||Sc(d,1);c.render();this.h&&fb(c.w,this.h)&&(d.la(b.frameState.viewState.center),this.h=null);this.a&&(b=this.a,b.a.length=0,b.f=0,b.b=0);this.i=1<this.c.length;return!0}return!1}fh.prototype.v=Nb;function kh(b){b=b?b:{};ch.call(this,{handleDownEvent:lh,handleDragEvent:mh,handleUpEvent:nh});this.b=b.condition?b.condition:Xg;this.a=void 0;this.h=void 0!==b.duration?b.duration:250}H(kh,ch);function mh(b){if(bh(b)){var c=b.map,d=c.ba();b=b.pixel;d=Math.atan2(d[1]/2-b[1],b[0]-d[0]/2);if(void 0!==this.a){b=d-this.a;var e=c.C(),f=e.N();c.render();Sg(c,e,f-b)}this.a=d}}
113
function nh(b){if(!bh(b))return!0;b=b.map;var c=b.C();Sc(c,-1);var d=c.N(),e=this.h,d=c.constrainRotation(d,0);Sg(b,c,d,void 0,e);return!1}function lh(b){return bh(b)&&Yg(b)&&this.b(b)?(b=b.map,Sc(b.C(),1),b.render(),this.a=void 0,!0):!1}kh.prototype.v=Nb;function oh(b){this.g=null;this.b=document.createElement("div");this.b.style.position="absolute";this.b.className="ol-box "+b;this.f=this.c=this.a=null}H(oh,Va);oh.prototype.L=function(){this.setMap(null)};function ph(b){var c=b.c,d=b.f;b=b.b.style;b.left=Math.min(c[0],d[0])+"px";b.top=Math.min(c[1],d[1])+"px";b.width=Math.abs(d[0]-c[0])+"px";b.height=Math.abs(d[1]-c[1])+"px"}
114
oh.prototype.setMap=function(b){if(this.a){this.a.o.removeChild(this.b);var c=this.b.style;c.left=c.top=c.width=c.height="inherit"}(this.a=b)&&this.a.o.appendChild(this.b)};function qh(b){var c=b.c,d=b.f,c=[c,[c[0],d[1]],d,[d[0],c[1]]].map(b.a.pa,b.a);c[4]=c[0].slice();b.g?b.g.U([c]):b.g=new Lc([c])}oh.prototype.M=function(){return this.g};function rh(b,c,d){R.call(this,b);this.coordinate=c;this.mapBrowserEvent=d}H(rh,R);function sh(b){ch.call(this,{handleDownEvent:th,handleDragEvent:uh,handleUpEvent:vh});b=b?b:{};this.a=new oh(b.className||"ol-dragbox");this.b=null;this.l=b.condition?b.condition:Mb;this.j=b.boxEndCondition?b.boxEndCondition:wh}H(sh,ch);function wh(b,c,d){b=d[0]-c[0];c=d[1]-c[1];return 64<=b*b+c*c}
115
function uh(b){if(bh(b)){var c=this.a,d=b.pixel;c.c=this.b;c.f=d;qh(c);ph(c);S(this,new rh("boxdrag",b.coordinate,b))}}sh.prototype.M=function(){return this.a.M()};sh.prototype.i=oa;function vh(b){if(!bh(b))return!0;this.a.setMap(null);this.j(b,this.b,b.pixel)&&(this.i(b),S(this,new rh("boxend",b.coordinate,b)));return!1}
116
function th(b){if(bh(b)&&Yg(b)&&this.l(b)){this.b=b.pixel;this.a.setMap(b.map);var c=this.a,d=this.b;c.c=this.b;c.f=d;qh(c);ph(c);S(this,new rh("boxstart",b.coordinate,b));return!0}return!1};function xh(b){b=b?b:{};var c=b.condition?b.condition:$g;this.h=void 0!==b.duration?b.duration:200;this.o=void 0!==b.out?b.out:!1;sh.call(this,{condition:c,className:b.className||"ol-dragzoom"})}H(xh,sh);
117
xh.prototype.i=function(){var b=this.P,c=b.C(),d=b.ba(),e=this.M().B();if(this.o){var f=Pc(c,d),e=[jh(b,Fb(e)),jh(b,[e[2],e[3]])],g=xb(Infinity,Infinity,-Infinity,-Infinity,void 0),h,k;h=0;for(k=e.length;h<k;++h)tb(g,e[h]);Lb(f,1/Qc(g,d));e=f}d=c.constrainResolution(Qc(e,d));f=c.G();g=c.aa();b.ea(Yc({resolution:f,duration:this.h,easing:Tc}));b.ea(Wc({source:g,duration:this.h,easing:Tc}));c.la(Gb(e));c.Pa(d)};function yh(b){Rg.call(this,{handleEvent:zh});b=b||{};this.a=function(b){return Zg(b)&&ah(b)};this.b=void 0!==b.condition?b.condition:this.a;this.c=void 0!==b.duration?b.duration:100;this.h=void 0!==b.pixelDelta?b.pixelDelta:128}H(yh,Rg);
118
function zh(b){var c=!1;if("keydown"==b.type){var d=b.originalEvent.keyCode;if(this.b(b)&&(40==d||37==d||39==d||38==d)){var e=b.map,c=e.C(),f=c.G()*this.h,g=0,h=0;40==d?h=-f:37==d?g=-f:39==d?g=f:h=f;d=[g,h];qb(d,c.N());f=this.c;if(g=c.aa())f&&0<f&&e.ea(Wc({source:g,duration:f,easing:Vc})),e=c.a.center([g[0]+d[0],g[1]+d[1]]),c.la(e);b.preventDefault();c=!0}}return!c};function Ah(b){Rg.call(this,{handleEvent:Bh});b=b?b:{};this.b=b.condition?b.condition:ah;this.a=b.delta?b.delta:1;this.c=void 0!==b.duration?b.duration:100}H(Ah,Rg);function Bh(b){var c=!1;if("keydown"==b.type||"keypress"==b.type){var d=b.originalEvent.charCode;if(this.b(b)&&(43==d||45==d)){c=b.map;d=43==d?this.a:-this.a;c.render();var e=c.C();Tg(c,e,d,void 0,this.c);b.preventDefault();c=!0}}return!c};function Ch(b){Rg.call(this,{handleEvent:Dh});b=b||{};this.a=0;this.j=void 0!==b.duration?b.duration:250;this.l=void 0!==b.useAnchor?b.useAnchor:!0;this.c=null;this.h=this.b=void 0}H(Ch,Rg);
119
function Dh(b){var c=!1;if("wheel"==b.type||"mousewheel"==b.type){var c=b.map,d=b.originalEvent;this.l&&(this.c=b.coordinate);var e;"wheel"==b.type?(e=d.deltaY,ff&&d.deltaMode===I.WheelEvent.DOM_DELTA_PIXEL&&(e/=jf),d.deltaMode===I.WheelEvent.DOM_DELTA_LINE&&(e*=40)):"mousewheel"==b.type&&(e=-d.wheelDeltaY,gf&&(e/=3));this.a+=e;void 0===this.b&&(this.b=Date.now());e=Math.max(80-(Date.now()-this.b),0);I.clearTimeout(this.h);this.h=I.setTimeout(this.i.bind(this,c),e);b.preventDefault();c=!0}return!c}
120
Ch.prototype.i=function(b){var c=Ba(this.a,-1,1),d=b.C();b.render();Tg(b,d,-c,this.c,this.j);this.a=0;this.c=null;this.h=this.b=void 0};function Eh(b){ch.call(this,{handleDownEvent:Fh,handleDragEvent:Gh,handleUpEvent:Hh});b=b||{};this.b=null;this.h=void 0;this.a=!1;this.i=0;this.l=void 0!==b.threshold?b.threshold:.3;this.j=void 0!==b.duration?b.duration:250}H(Eh,ch);
121
function Gh(b){var c=0,d=this.c[0],e=this.c[1],d=Math.atan2(e.clientY-d.clientY,e.clientX-d.clientX);void 0!==this.h&&(c=d-this.h,this.i+=c,!this.a&&Math.abs(this.i)>this.l&&(this.a=!0));this.h=d;b=b.map;d=b.a.getBoundingClientRect();e=eh(this.c);e[0]-=d.left;e[1]-=d.top;this.b=b.pa(e);this.a&&(d=b.C(),e=d.N(),b.render(),Sg(b,d,e+c,this.b))}
122
function Hh(b){if(2>this.c.length){b=b.map;var c=b.C();Sc(c,-1);if(this.a){var d=c.N(),e=this.b,f=this.j,d=c.constrainRotation(d,0);Sg(b,c,d,e,f)}return!1}return!0}function Fh(b){return 2<=this.c.length?(b=b.map,this.b=null,this.h=void 0,this.a=!1,this.i=0,this.s||Sc(b.C(),1),b.render(),!0):!1}Eh.prototype.v=Nb;function Ih(b){ch.call(this,{handleDownEvent:Jh,handleDragEvent:Kh,handleUpEvent:Lh});b=b?b:{};this.b=null;this.i=void 0!==b.duration?b.duration:400;this.a=void 0;this.h=1}H(Ih,ch);function Kh(b){var c=1,d=this.c[0],e=this.c[1],f=d.clientX-e.clientX,d=d.clientY-e.clientY,f=Math.sqrt(f*f+d*d);void 0!==this.a&&(c=this.a/f);this.a=f;1!=c&&(this.h=c);b=b.map;var f=b.C(),d=f.G(),e=b.a.getBoundingClientRect(),g=eh(this.c);g[0]-=e.left;g[1]-=e.top;this.b=b.pa(g);b.render();Ug(b,f,d*c,this.b)}
123
function Lh(b){if(2>this.c.length){b=b.map;var c=b.C();Sc(c,-1);var d=c.G(),e=this.b,f=this.i,d=c.constrainResolution(d,0,this.h-1);Ug(b,c,d,e,f);return!1}return!0}function Jh(b){return 2<=this.c.length?(b=b.map,this.b=null,this.a=void 0,this.h=1,this.s||Sc(b.C(),1),b.render(),!0):!1}Ih.prototype.v=Nb;function Mh(b){var c=b||{};b=Ha({},c);delete b.layers;c=c.layers;ig.call(this,b);this.b=[];this.a={};M(this,U("layers"),this.dd,this);c?Array.isArray(c)&&(c=new ed(c.slice())):c=new ed;this.set("layers",c)}H(Mh,ig);q=Mh.prototype;q.lb=function(){this.get("visible")&&this.f()};
124
q.dd=function(){this.b.forEach(L);this.b.length=0;var b=Nh(this);this.b.push(M(b,"add",this.cd,this),M(b,"remove",this.ed,this));for(var c in this.a)this.a[c].forEach(L);Ia(this.a);var b=b.a,d,e;c=0;for(d=b.length;c<d;c++)e=b[c],this.a[x(e).toString()]=[M(e,"propertychange",this.lb,this),M(e,"change",this.lb,this)];this.f()};q.cd=function(b){b=b.element;var c=x(b).toString();this.a[c]=[M(b,"propertychange",this.lb,this),M(b,"change",this.lb,this)];this.f()};
125
q.ed=function(b){b=x(b.element).toString();this.a[b].forEach(L);delete this.a[b];this.f()};function Nh(b){return b.get("layers")}
126
q.Gb=function(b){var c=void 0!==b?b:[],d=c.length;Nh(this).forEach(function(b){b.Gb(c)});b=jg(this);var e,f;for(e=c.length;d<e;d++)f=c[d],f.opacity*=b.opacity,f.visible=f.visible&&b.visible,f.maxResolution=Math.min(f.maxResolution,b.maxResolution),f.minResolution=Math.max(f.minResolution,b.minResolution),void 0!==b.extent&&(f.extent=void 0!==f.extent?Ib(f.extent,b.extent):b.extent);return c};q.Ib=function(){return"ready"};function Oh(b){Sb.call(this,{code:b,units:"m",extent:Ph,global:!0,worldExtent:Qh})}H(Oh,Sb);Oh.prototype.getPointResolution=function(b,c){return b/Ca(c[1]/6378137)};var Rh=6378137*Math.PI,Ph=[-Rh,-Rh,Rh,Rh],Qh=[-180,-85,180,85],Sh="EPSG:3857 EPSG:102100 EPSG:102113 EPSG:900913 urn:ogc:def:crs:EPSG:6.18:3:3857 urn:ogc:def:crs:EPSG::3857 http://www.opengis.net/gml/srs/epsg.xml#3857".split(" ").map(function(b){return new Oh(b)});
127
function Th(b,c,d){var e=b.length;d=1<d?d:2;void 0===c&&(2<d?c=b.slice():c=Array(e));for(var f=0;f<e;f+=d)c[f]=6378137*Math.PI*b[f]/180,c[f+1]=6378137*Math.log(Math.tan(Math.PI*(b[f+1]+90)/360));return c}function Uh(b,c,d){var e=b.length;d=1<d?d:2;void 0===c&&(2<d?c=b.slice():c=Array(e));for(var f=0;f<e;f+=d)c[f]=180*b[f]/(6378137*Math.PI),c[f+1]=360*Math.atan(Math.exp(b[f+1]/6378137))/Math.PI-90;return c};var Vh=new Ob(6378137);function Wh(b,c){Sb.call(this,{code:b,units:"degrees",extent:Xh,axisOrientation:c,global:!0,metersPerUnit:Yh,worldExtent:Xh})}H(Wh,Sb);Wh.prototype.getPointResolution=function(b){return b};
128
var Xh=[-180,-90,180,90],Yh=Math.PI*Vh.radius/180,Zh=[new Wh("CRS:84"),new Wh("EPSG:4326","neu"),new Wh("urn:ogc:def:crs:EPSG::4326","neu"),new Wh("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Wh("urn:ogc:def:crs:OGC:1.3:CRS84"),new Wh("urn:ogc:def:crs:OGC:2:84"),new Wh("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Wh("urn:x-ogc:def:crs:EPSG:4326","neu")];function $h(b){mg.call(this,b?b:{})}H($h,mg);function ai(b){b=b?b:{};var c=Ha({},b);delete c.preload;delete c.useInterimTilesOnError;mg.call(this,c);this.set("preload",void 0!==b.preload?b.preload:0);this.set("useInterimTilesOnError",void 0!==b.useInterimTilesOnError?b.useInterimTilesOnError:!0)}H(ai,mg);var bi=[0,0,0,1],ci=[],di=[0,0,0,1];function ei(b,c,d,e){0!==c&&(b.translate(d,e),b.rotate(c),b.translate(-d,-e))};function fi(b){b=b||{};this.a=void 0!==b.color?b.color:null;this.b=void 0}fi.prototype.fa=function(){return this.a};function gi(){this.b=-1};function hi(){this.b=-1;this.b=64;this.a=Array(4);this.c=Array(this.b);this.g=this.f=0;this.a[0]=1732584193;this.a[1]=4023233417;this.a[2]=2562383102;this.a[3]=271733878;this.g=this.f=0}H(hi,gi);
129
function ii(b,c,d){d||(d=0);var e=Array(16);if(ea(c))for(var f=0;16>f;++f)e[f]=c.charCodeAt(d++)|c.charCodeAt(d++)<<8|c.charCodeAt(d++)<<16|c.charCodeAt(d++)<<24;else for(f=0;16>f;++f)e[f]=c[d++]|c[d++]<<8|c[d++]<<16|c[d++]<<24;c=b.a[0];d=b.a[1];var f=b.a[2],g=b.a[3],h;h=c+(g^d&(f^g))+e[0]+3614090360&4294967295;c=d+(h<<7&4294967295|h>>>25);h=g+(f^c&(d^f))+e[1]+3905402710&4294967295;g=c+(h<<12&4294967295|h>>>20);h=f+(d^g&(c^d))+e[2]+606105819&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(c^f&(g^c))+
130
e[3]+3250441966&4294967295;d=f+(h<<22&4294967295|h>>>10);h=c+(g^d&(f^g))+e[4]+4118548399&4294967295;c=d+(h<<7&4294967295|h>>>25);h=g+(f^c&(d^f))+e[5]+1200080426&4294967295;g=c+(h<<12&4294967295|h>>>20);h=f+(d^g&(c^d))+e[6]+2821735955&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(c^f&(g^c))+e[7]+4249261313&4294967295;d=f+(h<<22&4294967295|h>>>10);h=c+(g^d&(f^g))+e[8]+1770035416&4294967295;c=d+(h<<7&4294967295|h>>>25);h=g+(f^c&(d^f))+e[9]+2336552879&4294967295;g=c+(h<<12&4294967295|h>>>20);h=f+(d^g&
131
(c^d))+e[10]+4294925233&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(c^f&(g^c))+e[11]+2304563134&4294967295;d=f+(h<<22&4294967295|h>>>10);h=c+(g^d&(f^g))+e[12]+1804603682&4294967295;c=d+(h<<7&4294967295|h>>>25);h=g+(f^c&(d^f))+e[13]+4254626195&4294967295;g=c+(h<<12&4294967295|h>>>20);h=f+(d^g&(c^d))+e[14]+2792965006&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(c^f&(g^c))+e[15]+1236535329&4294967295;d=f+(h<<22&4294967295|h>>>10);h=c+(f^g&(d^f))+e[1]+4129170786&4294967295;c=d+(h<<5&4294967295|h>>>
132
27);h=g+(d^f&(c^d))+e[6]+3225465664&4294967295;g=c+(h<<9&4294967295|h>>>23);h=f+(c^d&(g^c))+e[11]+643717713&4294967295;f=g+(h<<14&4294967295|h>>>18);h=d+(g^c&(f^g))+e[0]+3921069994&4294967295;d=f+(h<<20&4294967295|h>>>12);h=c+(f^g&(d^f))+e[5]+3593408605&4294967295;c=d+(h<<5&4294967295|h>>>27);h=g+(d^f&(c^d))+e[10]+38016083&4294967295;g=c+(h<<9&4294967295|h>>>23);h=f+(c^d&(g^c))+e[15]+3634488961&4294967295;f=g+(h<<14&4294967295|h>>>18);h=d+(g^c&(f^g))+e[4]+3889429448&4294967295;d=f+(h<<20&4294967295|
133
h>>>12);h=c+(f^g&(d^f))+e[9]+568446438&4294967295;c=d+(h<<5&4294967295|h>>>27);h=g+(d^f&(c^d))+e[14]+3275163606&4294967295;g=c+(h<<9&4294967295|h>>>23);h=f+(c^d&(g^c))+e[3]+4107603335&4294967295;f=g+(h<<14&4294967295|h>>>18);h=d+(g^c&(f^g))+e[8]+1163531501&4294967295;d=f+(h<<20&4294967295|h>>>12);h=c+(f^g&(d^f))+e[13]+2850285829&4294967295;c=d+(h<<5&4294967295|h>>>27);h=g+(d^f&(c^d))+e[2]+4243563512&4294967295;g=c+(h<<9&4294967295|h>>>23);h=f+(c^d&(g^c))+e[7]+1735328473&4294967295;f=g+(h<<14&4294967295|
134
h>>>18);h=d+(g^c&(f^g))+e[12]+2368359562&4294967295;d=f+(h<<20&4294967295|h>>>12);h=c+(d^f^g)+e[5]+4294588738&4294967295;c=d+(h<<4&4294967295|h>>>28);h=g+(c^d^f)+e[8]+2272392833&4294967295;g=c+(h<<11&4294967295|h>>>21);h=f+(g^c^d)+e[11]+1839030562&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^c)+e[14]+4259657740&4294967295;d=f+(h<<23&4294967295|h>>>9);h=c+(d^f^g)+e[1]+2763975236&4294967295;c=d+(h<<4&4294967295|h>>>28);h=g+(c^d^f)+e[4]+1272893353&4294967295;g=c+(h<<11&4294967295|h>>>21);h=f+(g^
135
c^d)+e[7]+4139469664&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^c)+e[10]+3200236656&4294967295;d=f+(h<<23&4294967295|h>>>9);h=c+(d^f^g)+e[13]+681279174&4294967295;c=d+(h<<4&4294967295|h>>>28);h=g+(c^d^f)+e[0]+3936430074&4294967295;g=c+(h<<11&4294967295|h>>>21);h=f+(g^c^d)+e[3]+3572445317&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^c)+e[6]+76029189&4294967295;d=f+(h<<23&4294967295|h>>>9);h=c+(d^f^g)+e[9]+3654602809&4294967295;c=d+(h<<4&4294967295|h>>>28);h=g+(c^d^f)+e[12]+3873151461&4294967295;
136
g=c+(h<<11&4294967295|h>>>21);h=f+(g^c^d)+e[15]+530742520&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^c)+e[2]+3299628645&4294967295;d=f+(h<<23&4294967295|h>>>9);h=c+(f^(d|~g))+e[0]+4096336452&4294967295;c=d+(h<<6&4294967295|h>>>26);h=g+(d^(c|~f))+e[7]+1126891415&4294967295;g=c+(h<<10&4294967295|h>>>22);h=f+(c^(g|~d))+e[14]+2878612391&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~c))+e[5]+4237533241&4294967295;d=f+(h<<21&4294967295|h>>>11);h=c+(f^(d|~g))+e[12]+1700485571&4294967295;c=d+
137
(h<<6&4294967295|h>>>26);h=g+(d^(c|~f))+e[3]+2399980690&4294967295;g=c+(h<<10&4294967295|h>>>22);h=f+(c^(g|~d))+e[10]+4293915773&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~c))+e[1]+2240044497&4294967295;d=f+(h<<21&4294967295|h>>>11);h=c+(f^(d|~g))+e[8]+1873313359&4294967295;c=d+(h<<6&4294967295|h>>>26);h=g+(d^(c|~f))+e[15]+4264355552&4294967295;g=c+(h<<10&4294967295|h>>>22);h=f+(c^(g|~d))+e[6]+2734768916&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~c))+e[13]+1309151649&4294967295;
138
d=f+(h<<21&4294967295|h>>>11);h=c+(f^(d|~g))+e[4]+4149444226&4294967295;c=d+(h<<6&4294967295|h>>>26);h=g+(d^(c|~f))+e[11]+3174756917&4294967295;g=c+(h<<10&4294967295|h>>>22);h=f+(c^(g|~d))+e[2]+718787259&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~c))+e[9]+3951481745&4294967295;b.a[0]=b.a[0]+c&4294967295;b.a[1]=b.a[1]+(f+(h<<21&4294967295|h>>>11))&4294967295;b.a[2]=b.a[2]+f&4294967295;b.a[3]=b.a[3]+g&4294967295}
139
function ji(b,c){var d;void 0===d&&(d=c.length);for(var e=d-b.b,f=b.c,g=b.f,h=0;h<d;){if(0==g)for(;h<=e;)ii(b,c,h),h+=b.b;if(ea(c))for(;h<d;){if(f[g++]=c.charCodeAt(h++),g==b.b){ii(b,f);g=0;break}}else for(;h<d;)if(f[g++]=c[h++],g==b.b){ii(b,f);g=0;break}}b.f=g;b.g+=d};function ki(b){b=b||{};this.f=void 0!==b.color?b.color:null;this.Ca=b.lineCap;this.a=void 0!==b.lineDash?b.lineDash:null;this.Da=b.lineJoin;this.Ea=b.miterLimit;this.g=b.width;this.b=void 0}ki.prototype.fa=function(){return this.f};ki.prototype.getLineDash=function(){return this.a};ki.prototype.ga=function(){return this.g};function li(b){b=b||{};this.h=this.b=this.c=null;this.f=void 0!==b.fill?b.fill:null;this.a=void 0!==b.stroke?b.stroke:null;this.g=b.radius;this.o=[0,0];this.H=this.j=this.i=null;var c=b.atlasManager,d,e=null,f,g=0;this.a&&(f=kd(this.a.fa()),g=this.a.ga(),void 0===g&&(g=1),e=this.a.getLineDash(),kf||(e=null));var h=2*(this.g+g)+1;f={strokeStyle:f,yc:g,size:h,lineDash:e};if(void 0===c)c=af(h,h),this.b=c.canvas,d=h=this.b.width,this.gc(f,c,0,0),this.f?this.h=this.b:(c=af(f.size,f.size),this.h=c.canvas,
140
this.bc(f,c,0,0));else{h=Math.round(h);(e=!this.f)&&(d=this.bc.bind(this,f));if(this.a){g=this.a;if(void 0===g.b){var k="s"+(g.f?kd(g.f):"-")+","+(void 0!==g.Ca?g.Ca.toString():"-")+","+(g.a?g.a.toString():"-")+","+(void 0!==g.Da?g.Da:"-")+","+(void 0!==g.Ea?g.Ea.toString():"-")+","+(void 0!==g.g?g.g.toString():"-"),l=new hi;ji(l,k);var m=Array((56>l.f?l.b:2*l.b)-l.f);m[0]=128;for(k=1;k<m.length-8;++k)m[k]=0;for(var n=8*l.g,k=m.length-8;k<m.length;++k)m[k]=n&255,n/=256;ji(l,m);m=Array(16);for(k=n=
141
0;4>k;++k)for(var p=0;32>p;p+=8)m[n++]=l.a[k]>>>p&255;if(8192>=m.length)l=String.fromCharCode.apply(null,m);else for(l="",k=0;k<m.length;k+=8192)l+=String.fromCharCode.apply(null,jd(m,k,k+8192));g.b=l}g=g.b}else g="-";this.f?(l=this.f,void 0===l.b&&(l.b=l.a instanceof CanvasPattern||l.a instanceof CanvasGradient?x(l.a).toString():"f"+(l.a?kd(l.a):"-")),l=l.b):l="-";this.c&&g==this.c[1]&&l==this.c[2]&&this.g==this.c[3]||(this.c=["c"+g+l+(void 0!==this.g?this.g.toString():"-"),g,l,this.g]);c=c.add(this.c[0],
142
h,h,this.gc.bind(this,f),d);this.b=c.image;this.o=[c.offsetX,c.offsetY];d=c.image.width;e?this.h=c.De:this.h=this.b}this.i=[h/2,h/2];this.j=[h,h];this.H=[d,d];Cg.call(this,{opacity:1,rotateWithView:!1,rotation:0,scale:1,snapToPixel:void 0!==b.snapToPixel?b.snapToPixel:!0})}H(li,Cg);q=li.prototype;q.La=function(){return this.f};q.ua=function(){return this.o};q.va=function(){return this.a};q.load=oa;q.me=oa;
143
q.gc=function(b,c,d,e){c.setTransform(1,0,0,1,0,0);c.translate(d,e);c.beginPath();c.arc(b.size/2,b.size/2,this.g,0,2*Math.PI,!0);this.f&&(c.fillStyle=ld(this.f.fa()),c.fill());this.a&&(c.strokeStyle=b.strokeStyle,c.lineWidth=b.yc,b.lineDash&&c.setLineDash(b.lineDash),c.stroke());c.closePath()};
144
q.bc=function(b,c,d,e){c.setTransform(1,0,0,1,0,0);c.translate(d,e);c.beginPath();c.arc(b.size/2,b.size/2,this.g,0,2*Math.PI,!0);c.fillStyle=kd(bi);c.fill();this.a&&(c.strokeStyle=b.strokeStyle,c.lineWidth=b.yc,b.lineDash&&c.setLineDash(b.lineDash),c.stroke());c.closePath()};function mi(b){b=b||{};this.g=null;this.b=ni;void 0!==b.geometry&&oi(this,b.geometry);this.c=void 0!==b.fill?b.fill:null;this.f=void 0!==b.image?b.image:null;this.h=void 0!==b.stroke?b.stroke:null;this.sa=void 0!==b.text?b.text:null;this.a=b.zIndex}mi.prototype.M=function(){return this.g};mi.prototype.La=function(){return this.c};mi.prototype.va=function(){return this.h};
145
function oi(b,c){ga(c)?b.b=c:"string"===typeof c?b.b=function(b){return b.get(c)}:c?void 0!==c&&(b.b=function(){return c}):b.b=ni;b.g=c}function pi(b){if(!ga(b)){var c;c=Array.isArray(b)?b:[b];b=function(){return c}}return b}var qi=null;function ri(){if(!qi){var b=new fi({color:"rgba(255,255,255,0.4)"}),c=new ki({color:"#3399CC",width:1.25});qi=[new mi({image:new li({fill:b,stroke:c,radius:5}),fill:b,stroke:c})]}return qi}
146
function si(){var b={},c=[255,255,255,1],d=[0,153,255,1];b.Polygon=[new mi({fill:new fi({color:[255,255,255,.5]})})];b.MultiPolygon=b.Polygon;b.LineString=[new mi({stroke:new ki({color:c,width:5})}),new mi({stroke:new ki({color:d,width:3})})];b.MultiLineString=b.LineString;b.Circle=b.Polygon.concat(b.LineString);b.Point=[new mi({image:new li({radius:6,fill:new fi({color:d}),stroke:new ki({color:c,width:1.5})}),zIndex:Infinity})];b.MultiPoint=b.Point;b.GeometryCollection=b.Polygon.concat(b.LineString,
147
b.Point);return b}function ni(b){return b.M()};function ti(b){b=b?b:{};var c=Ha({},b);delete c.style;delete c.renderBuffer;delete c.updateWhileAnimating;delete c.updateWhileInteracting;mg.call(this,c);this.c=void 0!==b.renderBuffer?b.renderBuffer:100;this.j=null;this.i=void 0;c=b.style;this.j=void 0!==c?c:ri;this.i=null===c?void 0:pi(this.j);this.f();this.l=void 0!==b.updateWhileAnimating?b.updateWhileAnimating:!1;this.o=void 0!==b.updateWhileInteracting?b.updateWhileInteracting:!1}H(ti,mg);function ui(b,c,d,e,f){this.g=b;this.s=c;this.i=d;this.u=e;this.Ja=f;this.c=this.a=this.b=this.O=this.$=this.J=null;this.S=this.P=this.H=this.K=this.w=this.v=0;this.da=!1;this.h=this.ja=0;this.ma=!1;this.D=0;this.f="";this.l=this.F=this.oa=this.na=0;this.W=this.A=this.j=null;this.o=[];this.ta=kc()}H(ui,kg);
148
function vi(b,c,d){if(b.c){c=sc(c,0,d,2,b.u,b.o);d=b.g;var e=b.ta,f=d.globalAlpha;1!=b.H&&(d.globalAlpha=f*b.H);var g=b.ja;b.da&&(g+=b.Ja);var h,k;h=0;for(k=c.length;h<k;h+=2){var l=c[h]-b.v,m=c[h+1]-b.w;b.ma&&(l=Math.round(l),m=Math.round(m));if(0!==g||1!=b.h){var n=l+b.v,p=m+b.w;qg(e,n,p,b.h,b.h,g,-n,-p);d.setTransform(e[0],e[1],e[4],e[5],e[12],e[13])}d.drawImage(b.c,b.P,b.S,b.D,b.K,l,m,b.D,b.K)}0===g&&1==b.h||d.setTransform(1,0,0,1,0,0);1!=b.H&&(d.globalAlpha=f)}}
149
function wi(b,c,d,e){var f=0;if(b.W&&""!==b.f){b.j&&xi(b,b.j);b.A&&yi(b,b.A);var g=b.W,h=b.g,k=b.O;k?(k.font!=g.font&&(k.font=h.font=g.font),k.textAlign!=g.textAlign&&(k.textAlign=h.textAlign=g.textAlign),k.textBaseline!=g.textBaseline&&(k.textBaseline=h.textBaseline=g.textBaseline)):(h.font=g.font,h.textAlign=g.textAlign,h.textBaseline=g.textBaseline,b.O={font:g.font,textAlign:g.textAlign,textBaseline:g.textBaseline});c=sc(c,f,d,e,b.u,b.o);for(g=b.g;f<d;f+=e){h=c[f]+b.na;k=c[f+1]+b.oa;if(0!==b.F||
150
1!=b.l){var l=qg(b.ta,h,k,b.l,b.l,b.F,-h,-k);g.setTransform(l[0],l[1],l[4],l[5],l[12],l[13])}b.A&&g.strokeText(b.f,h,k);b.j&&g.fillText(b.f,h,k)}0===b.F&&1==b.l||g.setTransform(1,0,0,1,0,0)}}function zi(b,c,d,e,f,g){var h=b.g;b=sc(c,d,e,f,b.u,b.o);h.moveTo(b[0],b[1]);c=b.length;g&&(c-=2);for(d=2;d<c;d+=2)h.lineTo(b[d],b[d+1]);g&&h.closePath();return e}function Ai(b,c,d,e,f){var g,h;g=0;for(h=e.length;g<h;++g)d=zi(b,c,d,e[g],f,!0);return d}q=ui.prototype;
151
q.ac=function(b){if(Jb(this.i,b.B())){if(this.b||this.a){this.b&&xi(this,this.b);this.a&&yi(this,this.a);var c;c=this.u;var d=this.o,e=b.a;c=e?sc(e,0,e.length,b.b,c,d):null;d=c[2]-c[0];e=c[3]-c[1];d=Math.sqrt(d*d+e*e);e=this.g;e.beginPath();e.arc(c[0],c[1],d,0,2*Math.PI);this.b&&e.fill();this.a&&e.stroke()}""!==this.f&&wi(this,b.a.slice(0,b.b),2,2)}};q.Ya=function(b){var c=b.a;b=b.b;this.c&&vi(this,c,c.length);""!==this.f&&wi(this,c,c.length,b)};
152
q.Xa=function(b){var c=b.a;b=b.b;this.c&&vi(this,c,c.length);""!==this.f&&wi(this,c,c.length,b)};q.cc=function(b){if(Jb(this.i,b.B())){if(this.a){yi(this,this.a);var c=this.g,d=b.a;c.beginPath();zi(this,d,0,d.length,b.b,!1);c.stroke()}""!==this.f&&(b=Bi(b),wi(this,b,2,2))}};
153
q.dc=function(b){var c=b.B();if(Jb(this.i,c)){if(this.a){yi(this,this.a);var c=this.g,d=b.a,e=0,f=b.Za(),g=b.b;c.beginPath();var h,k;h=0;for(k=f.length;h<k;++h)e=zi(this,d,e,f[h],g,!1);c.stroke()}""!==this.f&&(b=Ci(b),wi(this,b,b.length,2))}};q.fc=function(b){if(Jb(this.i,b.B())){if(this.a||this.b){this.b&&xi(this,this.b);this.a&&yi(this,this.a);var c=this.g;c.beginPath();Ai(this,Nc(b),0,b.Za(),b.b);this.b&&c.fill();this.a&&c.stroke()}""!==this.f&&(b=Oc(b),wi(this,b,2,2))}};
154
q.ec=function(b){if(Jb(this.i,b.B())){if(this.a||this.b){this.b&&xi(this,this.b);this.a&&yi(this,this.a);var c=this.g,d=Di(b),e=0,f=b.c,g=b.b,h,k;h=0;for(k=f.length;h<k;++h){var l=f[h];c.beginPath();e=Ai(this,d,e,l,g);this.b&&c.fill();this.a&&c.stroke()}}""!==this.f&&(b=Ei(b),wi(this,b,b.length,2))}};function xi(b,c){var d=b.g,e=b.J;e?e.fillStyle!=c.fillStyle&&(e.fillStyle=d.fillStyle=c.fillStyle):(d.fillStyle=c.fillStyle,b.J={fillStyle:c.fillStyle})}
155
function yi(b,c){var d=b.g,e=b.$;e?(e.lineCap!=c.lineCap&&(e.lineCap=d.lineCap=c.lineCap),kf&&!gb(e.lineDash,c.lineDash)&&d.setLineDash(e.lineDash=c.lineDash),e.lineJoin!=c.lineJoin&&(e.lineJoin=d.lineJoin=c.lineJoin),e.lineWidth!=c.lineWidth&&(e.lineWidth=d.lineWidth=c.lineWidth),e.miterLimit!=c.miterLimit&&(e.miterLimit=d.miterLimit=c.miterLimit),e.strokeStyle!=c.strokeStyle&&(e.strokeStyle=d.strokeStyle=c.strokeStyle)):(d.lineCap=c.lineCap,kf&&d.setLineDash(c.lineDash),d.lineJoin=c.lineJoin,d.lineWidth=
156
c.lineWidth,d.miterLimit=c.miterLimit,d.strokeStyle=c.strokeStyle,b.$={lineCap:c.lineCap,lineDash:c.lineDash,lineJoin:c.lineJoin,lineWidth:c.lineWidth,miterLimit:c.miterLimit,strokeStyle:c.strokeStyle})}
157
q.Ga=function(b,c){if(b){var d=b.fa();this.b={fillStyle:ld(d?d:bi)}}else this.b=null;if(c){var d=c.fa(),e=c.Ca,f=c.getLineDash(),g=c.Da,h=c.ga(),k=c.Ea;this.a={lineCap:void 0!==e?e:"round",lineDash:f?f:ci,lineJoin:void 0!==g?g:"round",lineWidth:this.s*(void 0!==h?h:1),miterLimit:void 0!==k?k:10,strokeStyle:kd(d?d:di)}}else this.a=null};
158
q.Ha=function(b){if(b){var c=b.i,d=b.b,e=b.ua(),f=b.j;this.v=c[0];this.w=c[1];this.K=f[1];this.c=d;this.H=b.l;this.P=e[0];this.S=e[1];this.da=b.A;this.ja=b.N();this.h=b.bb;this.ma=b.s;this.D=f[0]}else this.c=null};
159
q.wa=function(b){if(b){var c=b.La();c?(c=c.fa(),this.j={fillStyle:ld(c?c:bi)}):this.j=null;var d=b.va();if(d){var c=d.fa(),e=d.Ca,f=d.getLineDash(),g=d.Da,h=d.ga(),d=d.Ea;this.A={lineCap:void 0!==e?e:"round",lineDash:f?f:ci,lineJoin:void 0!==g?g:"round",lineWidth:void 0!==h?h:1,miterLimit:void 0!==d?d:10,strokeStyle:kd(c?c:di)}}else this.A=null;var c=b.Pc(),e=b.Qc(),f=b.Rc(),g=b.N(),h=b.bb,d=b.sa,k=b.Sc();b=b.Tc();this.W={font:void 0!==c?c:"10px sans-serif",textAlign:void 0!==k?k:"center",textBaseline:void 0!==
160
b?b:"middle"};this.f=void 0!==d?d:"";this.na=void 0!==e?this.s*e:0;this.oa=void 0!==f?this.s*f:0;this.F=void 0!==g?g:0;this.l=this.s*(void 0!==h?h:1)}else this.f=""};function Fi(b){sg.call(this,b);this.J=kc()}H(Fi,sg);
161
Fi.prototype.i=function(b,c,d){Gi(this,"precompose",d,b,void 0);var e=this.b?this.b.b():null;if(e){var f=c.extent,g=void 0!==f;if(g){var h=b.pixelRatio,k=b.size[0]*h,l=b.size[1]*h,m=b.viewState.rotation,n=Kb(f),p=[f[2],f[3]],r=[f[2],f[1]],f=Fb(f);rg(b.coordinateToPixelMatrix,n,n);rg(b.coordinateToPixelMatrix,p,p);rg(b.coordinateToPixelMatrix,r,r);rg(b.coordinateToPixelMatrix,f,f);d.save();ei(d,-m,k/2,l/2);d.beginPath();d.moveTo(n[0]*h,n[1]*h);d.lineTo(p[0]*h,p[1]*h);d.lineTo(r[0]*h,r[1]*h);d.lineTo(f[0]*
162
h,f[1]*h);d.clip();ei(d,m,k/2,l/2)}h=this.s;k=d.globalAlpha;d.globalAlpha=c.opacity;d.drawImage(e,0,0,+e.width,+e.height,Math.round(h[12]),Math.round(h[13]),Math.round(e.width*h[0]),Math.round(e.height*h[5]));d.globalAlpha=k;g&&d.restore()}Gi(this,"postcompose",d,b,void 0)};
163
function Gi(b,c,d,e,f){var g=b.a;if(Za(g,c)){var h=e.size[0]*e.pixelRatio,k=e.size[1]*e.pixelRatio,l=e.viewState.rotation;ei(d,-l,h/2,k/2);b=void 0!==f?f:Hi(b,e,0);b=new ui(d,e.pixelRatio,e.extent,b,e.viewState.rotation);S(g,new lg(c,g,b,e,d,null));ei(d,l,h/2,k/2)}}function Hi(b,c,d){var e=c.viewState,f=c.pixelRatio;return qg(b.J,f*c.size[0]/2,f*c.size[1]/2,f/e.resolution,-f/e.resolution,-e.rotation,-e.center[0]+d,-e.center[1])};var Ii=["Polygon","LineString","Image","Text"];function Ji(b,c,d){this.ja=b;this.$=c;this.c=null;this.i=0;this.resolution=d;this.W=this.D=null;this.b=[];this.f=[];this.P=kc();this.a=[];this.O=[];this.S=kc();this.da=kc()}H(Ji,kg);
164
function Ki(b,c,d,e,f,g){var h=b.f.length,k=b.Eb(),l=[c[d],c[d+1]],m=[NaN,NaN],n=!0,p,r,t;for(p=d+f;p<e;p+=f){m[0]=c[p];m[1]=c[p+1];t=k[1];var u=k[2],y=k[3],z=m[0],C=m[1],v=0;z<k[0]?v|=16:z>u&&(v|=4);C<t?v|=8:C>y&&(v|=2);0===v&&(v=1);t=v;t!==r?(n&&(b.f[h++]=l[0],b.f[h++]=l[1]),b.f[h++]=m[0],b.f[h++]=m[1],n=!1):1===t?(b.f[h++]=m[0],b.f[h++]=m[1],n=!1):n=!0;l[0]=m[0];l[1]=m[1];r=t}p===d+f&&(b.f[h++]=l[0],b.f[h++]=l[1]);g&&(b.f[h++]=c[d],b.f[h++]=c[d+1]);return h}
165
function Li(b,c){b.D=[0,c,0];b.b.push(b.D);b.W=[0,c,0];b.a.push(b.W)}
166
function Mi(b,c,d,e,f,g,h,k,l){var m;m=b.P;if(e[0]==m[0]&&e[1]==m[1]&&e[4]==m[4]&&e[5]==m[5]&&e[12]==m[12]&&e[13]==m[13])m=b.O;else{m=sc(b.f,0,b.f.length,2,e,b.O);var n=b.P;n[0]=e[0];n[1]=e[1];n[2]=e[2];n[3]=e[3];n[4]=e[4];n[5]=e[5];n[6]=e[6];n[7]=e[7];n[8]=e[8];n[9]=e[9];n[10]=e[10];n[11]=e[11];n[12]=e[12];n[13]=e[13];n[14]=e[14];n[15]=e[15]}e=!Ka(g);var n=0,p=h.length,r,t,u=b.S;b=b.da;for(var y,z,C,v;n<p;){var w=h[n],D,E,G,F;switch(w[0]){case 0:r=w[1];e&&g[x(r).toString()]||!r.M()?n=w[2]:void 0===
167
l||Jb(l,r.M().B())?++n:n=w[2];break;case 1:c.beginPath();++n;break;case 2:r=w[1];t=m[r];w=m[r+1];C=m[r+2]-t;r=m[r+3]-w;c.arc(t,w,Math.sqrt(C*C+r*r),0,2*Math.PI,!0);++n;break;case 3:c.closePath();++n;break;case 4:r=w[1];t=w[2];D=w[3];G=w[4]*d;var N=w[5]*d,A=w[6];E=w[7];var J=w[8],P=w[9];C=w[11];v=w[12];var K=w[13],Q=w[14];for(w[10]&&(C+=f);r<t;r+=2){w=m[r]-G;F=m[r+1]-N;K&&(w=Math.round(w),F=Math.round(F));if(1!=v||0!==C){var O=w+G,za=F+N;qg(u,O,za,v,v,C,-O,-za);c.transform(u[0],u[1],u[4],u[5],u[12],
168
u[13])}O=c.globalAlpha;1!=E&&(c.globalAlpha=O*E);var za=Q+J>D.width?D.width-J:Q,we=A+P>D.height?D.height-P:A;c.drawImage(D,J,P,za,we,w,F,za*d,we*d);1!=E&&(c.globalAlpha=O);if(1!=v||0!==C)oc(u,b),c.transform(b[0],b[1],b[4],b[5],b[12],b[13])}++n;break;case 5:r=w[1];t=w[2];G=w[3];N=w[4]*d;A=w[5]*d;C=w[6];v=w[7]*d;D=w[8];for(E=w[9];r<t;r+=2){w=m[r]+N;F=m[r+1]+A;if(1!=v||0!==C)qg(u,w,F,v,v,C,-w,-F),c.transform(u[0],u[1],u[4],u[5],u[12],u[13]);J=G.split("\n");P=J.length;1<P?(K=Math.round(1.5*c.measureText("M").width),
169
F-=(P-1)/2*K):K=0;for(Q=0;Q<P;Q++)O=J[Q],E&&c.strokeText(O,w,F),D&&c.fillText(O,w,F),F+=K;if(1!=v||0!==C)oc(u,b),c.transform(b[0],b[1],b[4],b[5],b[12],b[13])}++n;break;case 6:if(void 0!==k&&(r=w[1],r=k(r)))return r;++n;break;case 7:c.fill();++n;break;case 8:r=w[1];t=w[2];w=m[r];F=m[r+1];C=w+.5|0;v=F+.5|0;if(C!==y||v!==z)c.moveTo(w,F),y=C,z=v;for(r+=2;r<t;r+=2)if(w=m[r],F=m[r+1],C=w+.5|0,v=F+.5|0,C!==y||v!==z)c.lineTo(w,F),y=C,z=v;++n;break;case 9:c.fillStyle=w[1];++n;break;case 10:y=void 0!==w[7]?
170
w[7]:!0;z=w[2];c.strokeStyle=w[1];c.lineWidth=y?z*d:z;c.lineCap=w[3];c.lineJoin=w[4];c.miterLimit=w[5];kf&&c.setLineDash(w[6]);z=y=NaN;++n;break;case 11:c.font=w[1];c.textAlign=w[2];c.textBaseline=w[3];++n;break;case 12:c.stroke();++n;break;default:++n}}}Ji.prototype.h=function(b,c,d,e,f){Mi(this,b,c,d,e,f,this.b,void 0)};
0 ignored issues
show
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
171
function Ni(b){var c=b.a;c.reverse();var d,e=c.length,f,g,h=-1;for(d=0;d<e;++d)if(f=c[d],g=f[0],6==g)h=d;else if(0==g){f[2]=d;f=b.a;for(g=d;h<g;){var k=f[h];f[h]=f[g];f[g]=k;++h;--g}h=-1}}function Oi(b,c){b.D[2]=b.b.length;b.D=null;b.W[2]=b.a.length;b.W=null;var d=[6,c];b.b.push(d);b.a.push(d)}Ji.prototype.ob=oa;Ji.prototype.Eb=function(){return this.$};function Pi(b,c,d){Ji.call(this,b,c,d);this.A=this.J=null;this.K=this.w=this.v=this.u=this.F=this.s=this.o=this.H=this.l=this.j=this.g=void 0}
172
H(Pi,Ji);Pi.prototype.Ya=function(b,c){if(this.A){Li(this,c);var d=b.a,e=this.f.length,d=Ki(this,d,0,d.length,b.b,!1);this.b.push([4,e,d,this.A,this.g,this.j,this.l,this.H,this.o,this.s,this.F,this.u,this.v,this.w,this.K]);this.a.push([4,e,d,this.J,this.g,this.j,this.l,this.H,this.o,this.s,this.F,this.u,this.v,this.w,this.K]);Oi(this,c)}};
173
Pi.prototype.Xa=function(b,c){if(this.A){Li(this,c);var d=b.a,e=this.f.length,d=Ki(this,d,0,d.length,b.b,!1);this.b.push([4,e,d,this.A,this.g,this.j,this.l,this.H,this.o,this.s,this.F,this.u,this.v,this.w,this.K]);this.a.push([4,e,d,this.J,this.g,this.j,this.l,this.H,this.o,this.s,this.F,this.u,this.v,this.w,this.K]);Oi(this,c)}};Pi.prototype.ob=function(){Ni(this);this.j=this.g=void 0;this.A=this.J=null;this.K=this.w=this.u=this.F=this.s=this.o=this.H=this.v=this.l=void 0};
174
Pi.prototype.Ha=function(b){var c=b.i,d=b.j,e=b.h,f=b.b,g=b.ua();this.g=c[0];this.j=c[1];this.J=e;this.A=f;this.l=d[1];this.H=b.l;this.o=g[0];this.s=g[1];this.F=b.A;this.u=b.N();this.v=b.bb;this.w=b.s;this.K=d[0]};function Qi(b,c,d){Ji.call(this,b,c,d);this.g={Wa:void 0,Ra:void 0,Sa:null,Ta:void 0,Ua:void 0,Va:void 0,Jb:0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}H(Qi,Ji);
175
function Ri(b,c,d,e,f){var g=b.f.length;c=Ki(b,c,d,e,f,!1);g=[8,g,c];b.b.push(g);b.a.push(g);return e}q=Qi.prototype;q.Eb=function(){this.c||(this.c=vb(this.$),0<this.i&&ub(this.c,this.resolution*(this.i+1)/2,this.c));return this.c};
176
function Si(b){var c=b.g,d=c.strokeStyle,e=c.lineCap,f=c.lineDash,g=c.lineJoin,h=c.lineWidth,k=c.miterLimit;c.Wa==d&&c.Ra==e&&gb(c.Sa,f)&&c.Ta==g&&c.Ua==h&&c.Va==k||(c.Jb!=b.f.length&&(b.b.push([12]),c.Jb=b.f.length),b.b.push([10,d,h,e,g,k,f],[1]),c.Wa=d,c.Ra=e,c.Sa=f,c.Ta=g,c.Ua=h,c.Va=k)}
177
q.cc=function(b,c){var d=this.g,e=d.lineWidth;void 0!==d.strokeStyle&&void 0!==e&&(Si(this),Li(this,c),this.a.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash],[1]),d=b.a,Ri(this,d,0,d.length,b.b),this.a.push([12]),Oi(this,c))};
178
q.dc=function(b,c){var d=this.g,e=d.lineWidth;if(void 0!==d.strokeStyle&&void 0!==e){Si(this);Li(this,c);this.a.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash],[1]);var d=b.Za(),e=b.a,f=b.b,g=0,h,k;h=0;for(k=d.length;h<k;++h)g=Ri(this,e,g,d[h],f);this.a.push([12]);Oi(this,c)}};q.ob=function(){this.g.Jb!=this.f.length&&this.b.push([12]);Ni(this);this.g=null};
179
q.Ga=function(b,c){var d=c.fa();this.g.strokeStyle=kd(d?d:di);d=c.Ca;this.g.lineCap=void 0!==d?d:"round";d=c.getLineDash();this.g.lineDash=d?d:ci;d=c.Da;this.g.lineJoin=void 0!==d?d:"round";d=c.ga();this.g.lineWidth=void 0!==d?d:1;d=c.Ea;this.g.miterLimit=void 0!==d?d:10;this.g.lineWidth>this.i&&(this.i=this.g.lineWidth,this.c=null)};
180
function Ti(b,c,d){Ji.call(this,b,c,d);this.g={$b:void 0,Wa:void 0,Ra:void 0,Sa:null,Ta:void 0,Ua:void 0,Va:void 0,fillStyle:void 0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}H(Ti,Ji);
181
function Ui(b,c,d,e,f){var g=b.g,h=[1];b.b.push(h);b.a.push(h);var k,h=0;for(k=e.length;h<k;++h){var l=e[h],m=b.f.length;d=Ki(b,c,d,l,f,!0);d=[8,m,d];m=[3];b.b.push(d,m);b.a.push(d,m);d=l}c=[7];b.a.push(c);void 0!==g.fillStyle&&b.b.push(c);void 0!==g.strokeStyle&&(g=[12],b.b.push(g),b.a.push(g));return d}q=Ti.prototype;
182
q.ac=function(b,c){var d=this.g,e=d.strokeStyle;if(void 0!==d.fillStyle||void 0!==e){Vi(this);Li(this,c);this.a.push([9,kd(bi)]);void 0!==d.strokeStyle&&this.a.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash]);var f=b.a,e=this.f.length;Ki(this,f,0,f.length,b.b,!1);f=[1];e=[2,e];this.b.push(f,e);this.a.push(f,e);e=[7];this.a.push(e);void 0!==d.fillStyle&&this.b.push(e);void 0!==d.strokeStyle&&(d=[12],this.b.push(d),this.a.push(d));Oi(this,c)}};
183
q.fc=function(b,c){var d=this.g,e=d.strokeStyle;if(void 0!==d.fillStyle||void 0!==e)Vi(this),Li(this,c),this.a.push([9,kd(bi)]),void 0!==d.strokeStyle&&this.a.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash]),d=b.Za(),e=Nc(b),Ui(this,e,0,d,b.b),Oi(this,c)};
184
q.ec=function(b,c){var d=this.g,e=d.strokeStyle;if(void 0!==d.fillStyle||void 0!==e){Vi(this);Li(this,c);this.a.push([9,kd(bi)]);void 0!==d.strokeStyle&&this.a.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash]);var d=b.c,e=Di(b),f=b.b,g=0,h,k;h=0;for(k=d.length;h<k;++h)g=Ui(this,e,g,d[h],f);Oi(this,c)}};q.ob=function(){Ni(this);this.g=null;var b=this.ja;if(0!==b){var c=this.f,d,e;d=0;for(e=c.length;d<e;++d)c[d]=b*Math.round(c[d]/b)}};
185
q.Eb=function(){this.c||(this.c=vb(this.$),0<this.i&&ub(this.c,this.resolution*(this.i+1)/2,this.c));return this.c};
186
q.Ga=function(b,c){var d=this.g;if(b){var e=b.fa();d.fillStyle=ld(e?e:bi)}else d.fillStyle=void 0;c?(e=c.fa(),d.strokeStyle=kd(e?e:di),e=c.Ca,d.lineCap=void 0!==e?e:"round",e=c.getLineDash(),d.lineDash=e?e.slice():ci,e=c.Da,d.lineJoin=void 0!==e?e:"round",e=c.ga(),d.lineWidth=void 0!==e?e:1,e=c.Ea,d.miterLimit=void 0!==e?e:10,d.lineWidth>this.i&&(this.i=d.lineWidth,this.c=null)):(d.strokeStyle=void 0,d.lineCap=void 0,d.lineDash=null,d.lineJoin=void 0,d.lineWidth=void 0,d.miterLimit=void 0)};
187
function Vi(b){var c=b.g,d=c.fillStyle,e=c.strokeStyle,f=c.lineCap,g=c.lineDash,h=c.lineJoin,k=c.lineWidth,l=c.miterLimit;void 0!==d&&c.$b!=d&&(b.b.push([9,d]),c.$b=c.fillStyle);void 0===e||c.Wa==e&&c.Ra==f&&c.Sa==g&&c.Ta==h&&c.Ua==k&&c.Va==l||(b.b.push([10,e,k,f,h,l,g]),c.Wa=e,c.Ra=f,c.Sa=g,c.Ta=h,c.Ua=k,c.Va=l)}function Wi(b,c,d){Ji.call(this,b,c,d);this.w=this.v=this.u=null;this.A="";this.F=this.s=this.o=this.H=0;this.l=this.j=this.g=null}H(Wi,Ji);
188
function Xi(b,c,d,e,f){if(""!==b.A&&b.l&&(b.g||b.j)){if(b.g){var g=b.g,h=b.u;if(!h||h.fillStyle!=g.fillStyle){var k=[9,g.fillStyle];b.b.push(k);b.a.push(k);h?h.fillStyle=g.fillStyle:b.u={fillStyle:g.fillStyle}}}b.j&&(g=b.j,h=b.v,h&&h.lineCap==g.lineCap&&h.lineDash==g.lineDash&&h.lineJoin==g.lineJoin&&h.lineWidth==g.lineWidth&&h.miterLimit==g.miterLimit&&h.strokeStyle==g.strokeStyle||(k=[10,g.strokeStyle,g.lineWidth,g.lineCap,g.lineJoin,g.miterLimit,g.lineDash,!1],b.b.push(k),b.a.push(k),h?(h.lineCap=
189
g.lineCap,h.lineDash=g.lineDash,h.lineJoin=g.lineJoin,h.lineWidth=g.lineWidth,h.miterLimit=g.miterLimit,h.strokeStyle=g.strokeStyle):b.v={lineCap:g.lineCap,lineDash:g.lineDash,lineJoin:g.lineJoin,lineWidth:g.lineWidth,miterLimit:g.miterLimit,strokeStyle:g.strokeStyle}));g=b.l;h=b.w;h&&h.font==g.font&&h.textAlign==g.textAlign&&h.textBaseline==g.textBaseline||(k=[11,g.font,g.textAlign,g.textBaseline],b.b.push(k),b.a.push(k),h?(h.font=g.font,h.textAlign=g.textAlign,h.textBaseline=g.textBaseline):b.w=
190
{font:g.font,textAlign:g.textAlign,textBaseline:g.textBaseline});Li(b,f);g=b.f.length;c=Ki(b,c,0,d,e,!1);c=[5,g,c,b.A,b.H,b.o,b.s,b.F,!!b.g,!!b.j];b.b.push(c);b.a.push(c);Oi(b,f)}}
191
Wi.prototype.wa=function(b){if(b){var c=b.La();c?(c=c.fa(),c=ld(c?c:bi),this.g?this.g.fillStyle=c:this.g={fillStyle:c}):this.g=null;var d=b.va();if(d){var c=d.fa(),e=d.Ca,f=d.getLineDash(),g=d.Da,h=d.ga(),d=d.Ea,e=void 0!==e?e:"round",f=f?f.slice():ci,g=void 0!==g?g:"round",h=void 0!==h?h:1,d=void 0!==d?d:10,c=kd(c?c:di);if(this.j){var k=this.j;k.lineCap=e;k.lineDash=f;k.lineJoin=g;k.lineWidth=h;k.miterLimit=d;k.strokeStyle=c}else this.j={lineCap:e,lineDash:f,lineJoin:g,lineWidth:h,miterLimit:d,strokeStyle:c}}else this.j=
192
null;var l=b.Pc(),c=b.Qc(),e=b.Rc(),f=b.N(),h=b.bb,d=b.sa,g=b.Sc(),k=b.Tc();b=void 0!==l?l:"10px sans-serif";g=void 0!==g?g:"center";k=void 0!==k?k:"middle";this.l?(l=this.l,l.font=b,l.textAlign=g,l.textBaseline=k):this.l={font:b,textAlign:g,textBaseline:k};this.A=void 0!==d?d:"";this.H=void 0!==c?c:0;this.o=void 0!==e?e:0;this.s=void 0!==f?f:0;this.F=void 0!==h?h:1}else this.A=""};function Yi(b,c,d,e){this.A=b;this.g=c;this.l=d;this.c=e;this.b={};this.i=af(1,1);this.j=kc()}
193
function Zi(b){for(var c in b.b){var d=b.b[c],e;for(e in d)d[e].ob()}}Yi.prototype.Z=function(b,c,d,e,f){var g=this.j;qg(g,.5,.5,1/c,-1/c,-d,-b[0],-b[1]);var h=this.i;h.clearRect(0,0,1,1);var k;void 0!==this.c&&(k=sb(),tb(k,b),ub(k,c*this.c,k));return $i(this,h,g,d,e,function(b){if(0<h.getImageData(0,0,1,1).data[3]){if(b=f(b))return b;h.clearRect(0,0,1,1)}},k)};
0 ignored issues
show
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Complexity Best Practice introduced by
There is no return statement if 0 < h.getImageData(0, 0, 1, 1).data.3 is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
194
Yi.prototype.a=function(b,c){var d=void 0!==b?b.toString():"0",e=this.b[d];void 0===e&&(e={},this.b[d]=e);d=e[c];void 0===d&&(d=new aj[c](this.A,this.g,this.l),e[c]=d);return d};Yi.prototype.f=function(){return Ka(this.b)};
195
Yi.prototype.h=function(b,c,d,e,f,g){var h=Object.keys(this.b).map(Number);h.sort(cb);var k=this.g,l=k[0],m=k[1],n=k[2],k=k[3],l=[l,m,l,k,n,k,n,m];sc(l,0,8,2,d,l);b.save();b.beginPath();b.moveTo(l[0],l[1]);b.lineTo(l[2],l[3]);b.lineTo(l[4],l[5]);b.lineTo(l[6],l[7]);b.closePath();b.clip();g=g?g:Ii;for(var p,r,l=0,m=h.length;l<m;++l)for(p=this.b[h[l].toString()],n=0,k=g.length;n<k;++n)r=p[g[n]],void 0!==r&&r.h(b,c,d,e,f);b.restore()};
196
function $i(b,c,d,e,f,g,h){var k=Object.keys(b.b).map(Number);k.sort(function(b,c){return c-b});var l,m,n,p,r;l=0;for(m=k.length;l<m;++l)for(p=b.b[k[l].toString()],n=Ii.length-1;0<=n;--n)if(r=p[Ii[n]],void 0!==r&&(r=Mi(r,c,1,d,e,f,r.a,g,h)))return r}var aj={Image:Pi,LineString:Qi,Polygon:Ti,Text:Wi};function bj(b,c){return x(b)-x(c)}function cj(b,c){var d=.5*b/c;return d*d}function dj(b,c,d,e,f,g){var h;(h=d.f)&&h.me(f,g);if(f=(0,d.b)(c))e=uc(f,e),(0,ej[e.X()])(b,e,d,c);return!1}
0 ignored issues
show
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
197
var ej={Point:function(b,c,d,e){var f=d.f;if(f){var g=b.a(d.a,"Image");g.Ha(f);g.Ya(c,e)}if(f=d.sa)b=b.a(d.a,"Text"),b.wa(f),Xi(b,c.a,2,2,e)},LineString:function(b,c,d,e){var f=d.va();if(f){var g=b.a(d.a,"LineString");g.Ga(null,f);g.cc(c,e)}if(f=d.sa)b=b.a(d.a,"Text"),b.wa(f),Xi(b,Bi(c),2,2,e)},Polygon:function(b,c,d,e){var f=d.La(),g=d.va();if(f||g){var h=b.a(d.a,"Polygon");h.Ga(f,g);h.fc(c,e)}if(f=d.sa)b=b.a(d.a,"Text"),b.wa(f),Xi(b,Oc(c),2,2,e)},MultiPoint:function(b,c,d,e){var f=d.f;if(f){var g=
198
b.a(d.a,"Image");g.Ha(f);g.Xa(c,e)}if(f=d.sa)b=b.a(d.a,"Text"),b.wa(f),d=c.a,Xi(b,d,d.length,c.b,e)},MultiLineString:function(b,c,d,e){var f=d.va();if(f){var g=b.a(d.a,"LineString");g.Ga(null,f);g.dc(c,e)}if(f=d.sa)b=b.a(d.a,"Text"),b.wa(f),c=Ci(c),Xi(b,c,c.length,2,e)},MultiPolygon:function(b,c,d,e){var f=d.La(),g=d.va();if(g||f){var h=b.a(d.a,"Polygon");h.Ga(f,g);h.ec(c,e)}if(f=d.sa)b=b.a(d.a,"Text"),b.wa(f),c=Ei(c),Xi(b,c,c.length,2,e)},GeometryCollection:function(b,c,d,e){c=c.Ce();var f,g;f=0;
199
for(g=c.length;f<g;++f)(0,ej[c[f].X()])(b,c[f],d,e)},Circle:function(b,c,d,e){var f=d.La(),g=d.va();if(f||g){var h=b.a(d.a,"Polygon");h.Ga(f,g);h.ac(c,e)}if(f=d.sa)b=b.a(d.a,"Text"),b.wa(f),Xi(b,c.a.slice(0,c.b),2,2,e)}};var fj,gj=aa.navigator,hj=aa.chrome,ij=-1<gj.userAgent.indexOf("OPR"),jj=-1<gj.userAgent.indexOf("Edge");fj=!(!gj.userAgent.match("CriOS")&&null!==hj&&void 0!==hj&&"Google Inc."===gj.vendor&&0==ij&&0==jj);function kj(b,c,d,e){var f;f=ec(c,b)(d,void 0,d.length);d=c.getPointResolution(e,d);c=Tb(c);void 0!==c&&(d*=c);c=Tb(b);void 0!==c&&(d/=c);b=b.getPointResolution(d,f)/d;isFinite(b)&&0<b&&(d/=b);return d}
200
function lj(b,c,d,e){b=d-b;c=e-c;var f=Math.sqrt(b*b+c*c);return[Math.round(d+b/f),Math.round(e+c/f)]}
201
function mj(b,c,d,e,f,g,h,k,l,m,n){var p=af(Math.round(d*b),Math.round(d*c));if(0===l.length)return p.canvas;p.scale(d,d);var r=sb();l.forEach(function(b){b=b.extent;b[0]<r[0]&&(r[0]=b[0]);b[2]>r[2]&&(r[2]=b[2]);b[1]<r[1]&&(r[1]=b[1]);b[3]>r[3]&&(r[3]=b[3])});var t=af(Math.round(d*Db(r)/e),Math.round(d*Eb(r)/e)),u=d/e;l.forEach(function(b){t.drawImage(b.image,m,m,b.image.width-2*m,b.image.height-2*m,(b.extent[0]-r[0])*u,-(b.extent[3]-r[3])*u,Db(b.extent)*u,Eb(b.extent)*u)});var y=Kb(h);k.g.forEach(function(b){var c=
202
b.source,f=b.target,h=c[1][0],k=c[1][1],l=c[2][0],m=c[2][1];b=(f[0][0]-y[0])/g;var n=-(f[0][1]-y[1])/g,u=(f[1][0]-y[0])/g,A=-(f[1][1]-y[1])/g,J=(f[2][0]-y[0])/g,P=-(f[2][1]-y[1])/g,f=c[0][0],c=c[0][1],h=h-f,k=k-c,l=l-f,m=m-c;a:{h=[[h,k,0,0,u-b],[l,m,0,0,J-b],[0,0,h,k,A-n],[0,0,l,m,P-n]];k=h.length;for(l=0;l<k;l++){for(var m=l,K=Math.abs(h[l][l]),Q=l+1;Q<k;Q++){var O=Math.abs(h[Q][l]);O>K&&(K=O,m=Q)}if(0===K){h=null;break a}K=h[m];h[m]=h[l];h[l]=K;for(m=l+1;m<k;m++)for(K=-h[m][l]/h[l][l],Q=l;Q<k+1;Q++)h[m][Q]=
203
l==Q?0:h[m][Q]+K*h[l][Q]}l=Array(k);for(m=k-1;0<=m;m--)for(l[m]=h[m][k]/h[m][m],K=m-1;0<=K;K--)h[K][k]-=h[K][m]*l[m];h=l}h&&(p.save(),p.beginPath(),fj?(l=(b+u+J)/3,m=(n+A+P)/3,k=lj(l,m,b,n),u=lj(l,m,u,A),J=lj(l,m,J,P),p.moveTo(k[0],k[1]),p.lineTo(u[0],u[1]),p.lineTo(J[0],J[1])):(p.moveTo(b,n),p.lineTo(u,A),p.lineTo(J,P)),p.closePath(),p.clip(),p.transform(h[0],h[2],h[1],h[3],b,n),p.translate(r[0]-f,r[3]-c),p.scale(e/d,-e/d),p.drawImage(t.canvas,0,0),p.restore())});n&&(p.save(),p.strokeStyle="black",
204
p.lineWidth=1,k.g.forEach(function(b){var c=b.target;b=(c[0][0]-y[0])/g;var d=-(c[0][1]-y[1])/g,e=(c[1][0]-y[0])/g,f=-(c[1][1]-y[1])/g,h=(c[2][0]-y[0])/g,c=-(c[2][1]-y[1])/g;p.beginPath();p.moveTo(b,d);p.lineTo(e,f);p.lineTo(h,c);p.closePath();p.stroke()}),p.restore());return p.canvas};function nj(b,c,d,e,f){this.f=b;this.c=c;var g={},h=ec(this.c,this.f);this.b=function(b){var c=b[0]+"/"+b[1];g[c]||(g[c]=h(b));return g[c]};this.h=e;this.A=f*f;this.g=[];this.j=!1;this.l=this.f.b&&!!e&&!!this.f.B()&&Db(e)==Db(this.f.B());this.a=this.f.B()?Db(this.f.B()):null;this.i=this.c.B()?Db(this.c.B()):null;b=Kb(d);c=[d[2],d[3]];e=[d[2],d[1]];d=Fb(d);f=this.b(b);var k=this.b(c),l=this.b(e),m=this.b(d);oj(this,b,c,e,d,f,k,l,m,10);if(this.j){var n=Infinity;this.g.forEach(function(b){n=Math.min(n,
205
b.source[0][0],b.source[1][0],b.source[2][0])});this.g.forEach(function(b){if(Math.max(b.source[0][0],b.source[1][0],b.source[2][0])-n>this.a/2){var c=[[b.source[0][0],b.source[0][1]],[b.source[1][0],b.source[1][1]],[b.source[2][0],b.source[2][1]]];c[0][0]-n>this.a/2&&(c[0][0]-=this.a);c[1][0]-n>this.a/2&&(c[1][0]-=this.a);c[2][0]-n>this.a/2&&(c[2][0]-=this.a);Math.max(c[0][0],c[1][0],c[2][0])-Math.min(c[0][0],c[1][0],c[2][0])<this.a/2&&(b.source=c)}},this)}g={}}
206
function oj(b,c,d,e,f,g,h,k,l,m){var n=rb([g,h,k,l]),p=b.a?Db(n)/b.a:null,r=b.f.b&&.5<p&&1>p,t=!1;if(0<m){if(b.c.f&&b.i)var u=rb([c,d,e,f]),t=t|.25<Db(u)/b.i;!r&&b.f.f&&p&&(t|=.25<p)}if(t||!b.h||Jb(n,b.h)){if(!(t||isFinite(g[0])&&isFinite(g[1])&&isFinite(h[0])&&isFinite(h[1])&&isFinite(k[0])&&isFinite(k[1])&&isFinite(l[0])&&isFinite(l[1])))if(0<m)t=!0;else return;if(0<m&&(t||(p=b.b([(c[0]+e[0])/2,(c[1]+e[1])/2]),n=r?(Da(g[0],b.a)+Da(k[0],b.a))/2-Da(p[0],b.a):(g[0]+k[0])/2-p[0],p=(g[1]+k[1])/2-p[1],
207
t=n*n+p*p>b.A),t)){Math.abs(c[0]-e[0])<=Math.abs(c[1]-e[1])?(r=[(d[0]+e[0])/2,(d[1]+e[1])/2],n=b.b(r),p=[(f[0]+c[0])/2,(f[1]+c[1])/2],t=b.b(p),oj(b,c,d,r,p,g,h,n,t,m-1),oj(b,p,r,e,f,t,n,k,l,m-1)):(r=[(c[0]+d[0])/2,(c[1]+d[1])/2],n=b.b(r),p=[(e[0]+f[0])/2,(e[1]+f[1])/2],t=b.b(p),oj(b,c,r,p,f,g,n,t,l,m-1),oj(b,r,d,e,p,n,h,k,t,m-1));return}if(r){if(!b.l)return;b.j=!0}b.g.push({source:[g,k,l],target:[c,e,f]});b.g.push({source:[g,h,k],target:[c,d,e]})}}
208
function pj(b){var c=sb();b.g.forEach(function(b){b=b.source;tb(c,b[0]);tb(c,b[1]);tb(c,b[2])});return c};function qj(b,c,d,e,f,g){this.o=c;this.l=b.B();var h=c.B(),k=h?Ib(d,h):d,h=kj(b,c,Gb(k),e);this.i=new nj(b,c,k,this.l,.5*h);this.f=e;this.a=d;b=pj(this.i);this.j=(this.ha=g(b,h,f))?this.ha.h:1;this.eb=this.g=null;f=2;g=[];this.ha&&(f=0,g=this.ha.c);og.call(this,d,e,this.j,f,g)}H(qj,og);qj.prototype.L=function(){1==this.state&&(L(this.eb),this.eb=null);qj.R.L.call(this)};qj.prototype.b=function(){return this.g};
209
qj.prototype.cb=function(){var b=this.ha.I();2==b&&(this.g=mj(Db(this.a)/this.f,Eb(this.a)/this.f,this.j,this.ha.G(),0,this.f,this.a,this.i,[{extent:this.ha.B(),image:this.ha.b()}],0));this.state=b;pg(this)};qj.prototype.load=function(){if(0==this.state){this.state=1;pg(this);var b=this.ha.I();2==b||3==b?this.cb():(this.eb=M(this.ha,"change",function(){var b=this.ha.I();if(2==b||3==b)L(this.eb),this.eb=null,this.cb()},this),this.ha.load())}};function rj(b){pe.call(this,{attributions:b.attributions,extent:b.extent,logo:b.logo,projection:b.projection,state:b.state});this.a=null;this.j=0}H(rj,pe);function sj(b,c,d,e,f){var g=b.c;if(g&&f&&!dc(g,f)){if(b.a){if(b.j==b.g&&dc(b.a.o,f)&&b.a.G()==d&&b.a.h==e&&zb(b.a.B(),c))return b.a;Wa(b.a);b.a=null}b.a=new qj(g,f,c,d,e,function(b){return tj(this,b)}.bind(b));b.j=b.g;return b.a}g&&(f=g);return tj(b,c)}
210
rj.prototype.h=function(b){b=b.target;switch(b.I()){case 1:S(this,new uj(vj,b));break;case 2:S(this,new uj(wj,b));break;case 3:S(this,new uj(xj,b))}};function yj(b,c){b.b().src=c}function uj(b,c){R.call(this,b);this.image=c}H(uj,R);var vj="imageloadstart",wj="imageloadend",xj="imageloaderror";function Y(b){T.call(this);this.h=void 0;this.a="geometry";this.i=null;this.c=void 0;this.b=null;M(this,U(this.a),this.kb,this);void 0!==b&&(b instanceof gc||!b?this.Fa(b):this.F(b))}H(Y,T);q=Y.prototype;q.clone=function(){var b=new Y(Ha({},this.K));zj(b,this.a);var c=this.M();c&&b.Fa(c.clone());if(c=this.i)b.i=c,b.c=c?Aj(c):void 0,b.f();return b};q.M=function(){return this.get(this.a)};q.ya=function(){return this.h};q.Yc=function(){this.f()};
0 ignored issues
show
Coding Style introduced by
As per coding-style, switch statements should have a default case.
Loading history...
211
q.kb=function(){this.b&&(L(this.b),this.b=null);var b=this.M();b&&(this.b=M(b,"change",this.Yc,this));this.f()};q.Fa=function(b){this.set(this.a,b)};q.ge=function(b){this.h=b;this.f()};function zj(b,c){Ta(b,U(b.a),b.kb,b);b.a=c;M(b,U(b.a),b.kb,b);b.kb()}function Aj(b){if(!ga(b)){var c;c=Array.isArray(b)?b:[b];b=function(){return c}}return b};function Bj(b,c,d){return function(e,f,g){var h=new XMLHttpRequest;h.open("GET",ga(b)?b(e,f,g):b,!0);"arraybuffer"==c.X()&&(h.responseType="arraybuffer");h.onload=function(){if(200<=h.status&&300>h.status){var b=c.X(),e;"json"==b||"text"==b?e=h.responseText:"xml"==b?(e=h.responseXML,e||(b=h.responseText,e=(new DOMParser).parseFromString(b,"application/xml"))):"arraybuffer"==b&&(e=h.response);e&&d.call(this,c.Ee(e,{featureProjection:g}),c.Fe(e))}}.bind(this);h.send()}}
212
function Cj(b,c){return Bj(b,c,function(b){this.zb(b)})};function Dj(){return[[-Infinity,-Infinity,Infinity,Infinity]]};var Ej;
213
(function(){var b={hc:{}};(function(){function c(b,d){if(!(this instanceof c))return new c(b,d);this.xb=Math.max(4,b||9);this.Rb=Math.max(2,Math.ceil(.4*this.xb));d&&this.Fc(d);this.clear()}function d(b,c){b.bbox=e(b,0,b.children.length,c)}function e(b,c,d,e){for(var g=[Infinity,Infinity,-Infinity,-Infinity],h;c<d;c++)h=b.children[c],f(g,b.Y?e(h):h.bbox);return g}function f(b,c){b[0]=Math.min(b[0],c[0]);b[1]=Math.min(b[1],c[1]);b[2]=Math.max(b[2],c[2]);b[3]=Math.max(b[3],c[3])}function g(b,c){return b.bbox[0]-
0 ignored issues
show
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
214
c.bbox[0]}function h(b,c){return b.bbox[1]-c.bbox[1]}function k(b){return(b[2]-b[0])*(b[3]-b[1])}function l(b){return b[2]-b[0]+(b[3]-b[1])}function m(b,c){return b[0]<=c[0]&&b[1]<=c[1]&&c[2]<=b[2]&&c[3]<=b[3]}function n(b,c){return c[0]<=b[2]&&c[1]<=b[3]&&c[2]>=b[0]&&c[3]>=b[1]}function p(b,c,d,e,f){for(var g=[c,d],h;g.length;)d=g.pop(),c=g.pop(),d-c<=e||(h=c+Math.ceil((d-c)/e/2)*e,r(b,c,d,h,f),g.push(c,h,h,d))}function r(b,c,d,e,f){for(var g,h,k,l,m;d>c;){600<d-c&&(g=d-c+1,h=e-c+1,k=Math.log(g),
215
l=.5*Math.exp(2*k/3),m=.5*Math.sqrt(k*l*(g-l)/g)*(0>h-g/2?-1:1),k=Math.max(c,Math.floor(e-h*l/g+m)),h=Math.min(d,Math.floor(e+(g-h)*l/g+m)),r(b,k,h,e,f));g=b[e];h=c;l=d;t(b,c,e);for(0<f(b[d],g)&&t(b,c,d);h<l;){t(b,h,l);h++;for(l--;0>f(b[h],g);)h++;for(;0<f(b[l],g);)l--}0===f(b[c],g)?t(b,c,l):(l++,t(b,l,d));l<=e&&(c=l+1);e<=l&&(d=l-1)}}function t(b,c,d){var e=b[c];b[c]=b[d];b[d]=e}c.prototype={all:function(){return this.Nb(this.data,[])},search:function(b){var c=this.data,d=[],e=this.ca;if(!n(b,c.bbox))return d;
216
for(var f=[],g,h,k,l;c;){g=0;for(h=c.children.length;g<h;g++)k=c.children[g],l=c.Y?e(k):k.bbox,n(b,l)&&(c.Y?d.push(k):m(b,l)?this.Nb(k,d):f.push(k));c=f.pop()}return d},load:function(b){if(!b||!b.length)return this;if(b.length<this.Rb){for(var c=0,d=b.length;c<d;c++)this.Aa(b[c]);return this}b=this.Pb(b.slice(),0,b.length-1,0);this.data.children.length?this.data.height===b.height?this.Sb(this.data,b):(this.data.height<b.height&&(c=this.data,this.data=b,b=c),this.Qb(b,this.data.height-b.height-1,!0)):
217
this.data=b;return this},Aa:function(b){b&&this.Qb(b,this.data.height-1);return this},clear:function(){this.data={children:[],height:1,bbox:[Infinity,Infinity,-Infinity,-Infinity],Y:!0};return this},remove:function(b){if(!b)return this;for(var c=this.data,d=this.ca(b),e=[],f=[],g,h,k,l;c||e.length;){c||(c=e.pop(),h=e[e.length-1],g=f.pop(),l=!0);if(c.Y&&(k=c.children.indexOf(b),-1!==k)){c.children.splice(k,1);e.push(c);this.Ec(e);break}l||c.Y||!m(c.bbox,d)?h?(g++,c=h.children[g],l=!1):c=null:(e.push(c),
218
f.push(g),g=0,h=c,c=c.children[0])}return this},ca:function(b){return b},Bb:function(b,c){return b[0]-c[0]},Cb:function(b,c){return b[1]-c[1]},toJSON:function(){return this.data},Nb:function(b,c){for(var d=[];b;)b.Y?c.push.apply(c,b.children):d.push.apply(d,b.children),b=d.pop();return c},Pb:function(b,c,e,f){var g=e-c+1,h=this.xb,k;if(g<=h)return k={children:b.slice(c,e+1),height:1,bbox:null,Y:!0},d(k,this.ca),k;f||(f=Math.ceil(Math.log(g)/Math.log(h)),h=Math.ceil(g/Math.pow(h,f-1)));k={children:[],
219
height:f,bbox:null,Y:!1};var g=Math.ceil(g/h),h=g*Math.ceil(Math.sqrt(h)),l,m,n;for(p(b,c,e,h,this.Bb);c<=e;c+=h)for(m=Math.min(c+h-1,e),p(b,c,m,g,this.Cb),l=c;l<=m;l+=g)n=Math.min(l+g-1,m),k.children.push(this.Pb(b,l,n,f-1));d(k,this.ca);return k},Dc:function(b,c,d,e){for(var f,g,h,l,m,n,p,r;;){e.push(c);if(c.Y||e.length-1===d)break;p=r=Infinity;f=0;for(g=c.children.length;f<g;f++)h=c.children[f],m=k(h.bbox),n=h.bbox,n=(Math.max(n[2],b[2])-Math.min(n[0],b[0]))*(Math.max(n[3],b[3])-Math.min(n[1],
220
b[1]))-m,n<r?(r=n,p=m<p?m:p,l=h):n===r&&m<p&&(p=m,l=h);c=l||c.children[0]}return c},Qb:function(b,c,d){var e=this.ca;d=d?b.bbox:e(b);var e=[],g=this.Dc(d,this.data,c,e);g.children.push(b);for(f(g.bbox,d);0<=c;)if(e[c].children.length>this.xb)this.Gc(e,c),c--;else break;this.Ac(d,e,c)},Gc:function(b,c){var e=b[c],f=e.children.length,g=this.Rb;this.Bc(e,g,f);f=this.Cc(e,g,f);f={children:e.children.splice(f,e.children.length-f),height:e.height,bbox:null,Y:!1};e.Y&&(f.Y=!0);d(e,this.ca);d(f,this.ca);
221
c?b[c-1].children.push(f):this.Sb(e,f)},Sb:function(b,c){this.data={children:[b,c],height:b.height+1,bbox:null,Y:!1};d(this.data,this.ca)},Cc:function(b,c,d){var f,g,h,l,m,n,p;m=n=Infinity;for(f=c;f<=d-c;f++)g=e(b,0,f,this.ca),h=e(b,f,d,this.ca),l=Math.max(0,Math.min(g[2],h[2])-Math.max(g[0],h[0]))*Math.max(0,Math.min(g[3],h[3])-Math.max(g[1],h[1])),g=k(g)+k(h),l<m?(m=l,p=f,n=g<n?g:n):l===m&&g<n&&(n=g,p=f);return p},Bc:function(b,c,d){var e=b.Y?this.Bb:g,f=b.Y?this.Cb:h,k=this.Ob(b,c,d,e);c=this.Ob(b,
222
c,d,f);k<c&&b.children.sort(e)},Ob:function(b,c,d,g){b.children.sort(g);g=this.ca;var h=e(b,0,c,g),k=e(b,d-c,d,g),m=l(h)+l(k),n,p;for(n=c;n<d-c;n++)p=b.children[n],f(h,b.Y?g(p):p.bbox),m+=l(h);for(n=d-c-1;n>=c;n--)p=b.children[n],f(k,b.Y?g(p):p.bbox),m+=l(k);return m},Ac:function(b,c,d){for(;0<=d;d--)f(c[d].bbox,b)},Ec:function(b){for(var c=b.length-1,e;0<=c;c--)0===b[c].children.length?0<c?(e=b[c-1].children,e.splice(e.indexOf(b[c]),1)):this.clear():d(b[c],this.ca)},Fc:function(b){var c=["return a",
223
" - b",";"];this.Bb=new Function("a","b",c.join(b[0]));this.Cb=new Function("a","b",c.join(b[1]));this.ca=new Function("a","return [a"+b.join(", a")+"];")}};"undefined"!==typeof b?b.hc=c:"undefined"!==typeof self?self.a=c:window.a=c})();Ej=b.hc})();function Fj(b){this.a=Ej(b);this.b={}}q=Fj.prototype;q.Aa=function(b,c){var d=[b[0],b[1],b[2],b[3],c];this.a.Aa(d);this.b[x(c)]=d};q.load=function(b,c){for(var d=Array(c.length),e=0,f=c.length;e<f;e++){var g=b[e],h=c[e],g=[g[0],g[1],g[2],g[3],h];d[e]=g;this.b[x(h)]=g}this.a.load(d)};q.remove=function(b){b=x(b);var c=this.b[b];delete this.b[b];return null!==this.a.remove(c)};function Gj(b){return b.a.all().map(function(b){return b[4]})}
224
function Hj(b,c){return b.a.search(c).map(function(b){return b[4]})}function Ij(b,c,d,e){return Jj(Hj(b,c),d,e)}function Jj(b,c,d){for(var e,f=0,g=b.length;f<g&&!(e=c.call(d,b[f]));f++);return e}q.clear=function(){this.a.clear();this.b={}};q.B=function(){return this.a.data.bbox};function Kj(b){b=b||{};pe.call(this,{attributions:b.attributions,logo:b.logo,projection:void 0,state:"ready",wrapX:void 0!==b.wrapX?b.wrapX:!0});this.u=oa;this.P=b.format;this.w=b.url;void 0!==b.loader?this.u=b.loader:void 0!==this.w&&(this.u=Cj(this.w,this.P));this.S=void 0!==b.strategy?b.strategy:Dj;var c=void 0!==b.useSpatialIndex?b.useSpatialIndex:!0;this.a=c?new Fj:null;this.v=new Fj;this.b={};this.h={};this.j={};this.l={};this.i=null;var d,e;b.features instanceof ed?(d=b.features,e=d.a):Array.isArray(b.features)&&
0 ignored issues
show
introduced by
The for loop does not have a body. Maybe you have misplaced a semicolon. If you do wish to have a loop without a body, use an empty body {}.
Loading history...
225
(e=b.features);c||void 0!==d||(d=new ed(e));void 0!==e&&Lj(this,e);void 0!==d&&Mj(this,d)}H(Kj,pe);q=Kj.prototype;q.yb=function(b){var c=x(b).toString();if(Nj(this,c,b)){Oj(this,c,b);var d=b.M();d?(c=d.B(),this.a&&this.a.Aa(c,b)):this.b[c]=b;S(this,new Pj("addfeature",b))}this.f()};function Oj(b,c,d){b.l[c]=[M(d,"change",b.jc,b),M(d,"propertychange",b.jc,b)]}function Nj(b,c,d){var e=!0,f=d.ya();void 0!==f?f.toString()in b.h?e=!1:b.h[f.toString()]=d:b.j[c]=d;return e}q.zb=function(b){Lj(this,b);this.f()};
226
function Lj(b,c){var d,e,f,g,h=[],k=[],l=[];e=0;for(f=c.length;e<f;e++)g=c[e],d=x(g).toString(),Nj(b,d,g)&&k.push(g);e=0;for(f=k.length;e<f;e++){g=k[e];d=x(g).toString();Oj(b,d,g);var m=g.M();m?(d=m.B(),h.push(d),l.push(g)):b.b[d]=g}b.a&&b.a.load(h,l);e=0;for(f=k.length;e<f;e++)S(b,new Pj("addfeature",k[e]))}
227
function Mj(b,c){var d=!1;M(b,"addfeature",function(b){d||(d=!0,c.push(b.feature),d=!1)});M(b,"removefeature",function(b){d||(d=!0,c.remove(b.feature),d=!1)});M(c,"add",function(b){d||(b=b.element,d=!0,this.yb(b),d=!1)},b);M(c,"remove",function(b){d||(b=b.element,d=!0,this.vc(b),d=!1)},b);b.i=c}
228
q.clear=function(b){if(b){for(var c in this.l)this.l[c].forEach(L);this.i||(this.l={},this.h={},this.j={})}else if(this.a){b=this.Lb;Jj(Gj(this.a),b,this);for(var d in this.b)this.Lb(this.b[d])}this.i&&this.i.clear();this.a&&this.a.clear();this.v.clear();this.b={};S(this,new Pj("clear"));this.f()};function Qj(b,c,d,e){b.a?Ij(b.a,c,d,e):b.i&&b.i.forEach(d,e)}q.Od=function(){var b;this.i?b=this.i.a:this.a&&(b=Gj(this.a),Ka(this.b)||eb(b,Ja(this.b)));return b};q.B=function(){return this.a.B()};
229
q.jc=function(b){b=b.target;var c=x(b).toString(),d=b.M();if(d)if(d=d.B(),c in this.b)delete this.b[c],this.a&&this.a.Aa(d,b);else{if(this.a){var e=this.a,f=x(b);zb(e.b[f].slice(0,4),d)||(e.remove(b),e.Aa(d,b))}}else c in this.b||(this.a&&this.a.remove(b),this.b[c]=b);d=b.ya();void 0!==d?(d=d.toString(),c in this.j?(delete this.j[c],this.h[d]=b):this.h[d]!==b&&(Rj(this,b),this.h[d]=b)):c in this.j||(Rj(this,b),this.j[c]=b);this.f();S(this,new Pj("changefeature",b))};
230
function Sj(b,c,d,e){var f=b.v;c=b.S(c,d);var g,h;g=0;for(h=c.length;g<h;++g){var k=c[g];Ij(f,k,function(b){return wb(b.extent,k)})||(b.u.call(b,k,d,e),f.Aa(k,{extent:k.slice()}))}}q.vc=function(b){var c=x(b).toString();c in this.b?delete this.b[c]:this.a&&this.a.remove(b);this.Lb(b);this.f()};q.Lb=function(b){var c=x(b).toString();this.l[c].forEach(L);delete this.l[c];var d=b.ya();void 0!==d?delete this.h[d.toString()]:delete this.j[c];S(this,new Pj("removefeature",b))};
231
function Rj(b,c){for(var d in b.h)if(b.h[d]===c){delete b.h[d];break}}function Pj(b,c){R.call(this,b);this.feature=c}H(Pj,R);function Tj(b){Fi.call(this,b);this.b=null;this.s=kc()}H(Tj,Fi);Tj.prototype.Z=function(b,c,d,e){var f=this.a;return f.T().Z(b,c.viewState.resolution,c.viewState.rotation,c.skippedFeatureUids,function(b){return d.call(e,b,f)})};
232
Tj.prototype.j=function(b,c){var d=b.pixelRatio,e=b.viewState,f=e.center,g=e.resolution,h=this.a.T(),k=b.viewHints,l=b.extent;void 0!==c.extent&&(l=Ib(l,c.extent));k[0]||k[1]||Cb(l)||(e=sj(h,l,g,d,e.projection))&&ug(this,e)&&(this.b=e);if(this.b){var e=this.b,k=e.B(),l=e.G(),m=e.h,g=d*l/(g*m);qg(this.s,d*b.size[0]/2,d*b.size[1]/2,g,g,0,m*(k[0]-f[0])/l,m*(f[1]-k[3])/l);wg(b.attributions,e.c);xg(b,h)}return!!this.b};function Uj(b){Fi.call(this,b);this.h=af();this.c=null;this.u=sb();this.v=[0,0,0];this.o=kc()}H(Uj,Fi);
233
Uj.prototype.i=function(b,c,d){var e=Hi(this,b,0);Gi(this,"precompose",d,b,e);var f=b.pixelRatio,g=b.viewState,h=g.center,k=g.projection,l=g.resolution,g=g.rotation,m=b.size,n=Math.round(f*m[0]/2),m=Math.round(f*m[1]/2),f=f/l,p=this.a,r=p.T(),t=r.Fb(k),u=r.qa(k),p=Za(p,"render"),y=d,z,C,v,w;if(g||p)y=this.h,z=y.canvas,w=De(u,l),v=Je(r,w,k),w=oe(Ce(u,w)),v=v[0]/w[0],l=d.canvas.width*v,C=d.canvas.height*v,w=Math.round(Math.sqrt(l*l+C*C)),z.width!=w?z.width=z.height=w:y.clearRect(0,0,w,w),z=(w-l)/2/
234
v,C=(w-C)/2/v,f*=v,n=Math.round(v*(n+z)),m=Math.round(v*(m+C));l=y.globalAlpha;y.globalAlpha=c.opacity;var D=this.c,E;c=r.Hb(k)&&1==c.opacity;c||(D.reverse(),E=[]);for(var G=0,F=D.length;G<F;++G){var N=D[G],A=N.V,J=ve(u,A,this.u),P=A[0],K=Fb(ve(u,Ee(u,h,P,this.v))),A=Math.round(Db(J)*f),Q=Math.round(Eb(J)*f),O=Math.round((J[0]-K[0])*f/A)*A+n+Math.round((K[0]-h[0])*f),J=Math.round((K[1]-J[3])*f/Q)*Q+m+Math.round((h[1]-K[1])*f);if(!c){K=[O,J,O+A,J+Q];y.save();for(var za=0,we=E.length;za<we;++za){var Qa=
235
E[za];Jb(K,Qa)&&(y.beginPath(),y.moveTo(K[0],K[1]),y.lineTo(K[0],K[3]),y.lineTo(K[2],K[3]),y.lineTo(K[2],K[1]),y.moveTo(Qa[0],Qa[1]),y.lineTo(Qa[2],Qa[1]),y.lineTo(Qa[2],Qa[3]),y.lineTo(Qa[0],Qa[3]),y.closePath(),y.clip())}E.push(K)}P=Je(r,P,k);y.drawImage(N.ra(),t,t,P[0],P[1],O,J,A,Q);c||y.restore()}p&&(k=z-n/v+n,E=C-m/v+m,h=qg(this.o,w/2-k,w/2-E,f,-f,-g,-h[0]+k/f,-h[1]-E/f),Gi(this,"render",y,b,h));(g||p)&&d.drawImage(y.canvas,-Math.round(z),-Math.round(C),w/v,w/v);y.globalAlpha=l;Gi(this,"postcompose",
236
d,b,e)};
237
Uj.prototype.j=function(b,c){function d(b){b=b.I();return 2==b||4==b||3==b&&!t}var e=b.pixelRatio,f=b.viewState,g=f.projection,h=this.a,k=h.T(),l=k.qa(g),m=De(l,f.resolution,0),n=l.G(m),p=f.center;n==f.resolution?(p=zg(p,n,b.size),f=Hb(p,n,f.rotation,b.size)):f=b.extent;void 0!==c.extent&&(f=Ib(f,c.extent));if(Cb(f))return!1;n=ze(l,f,n);p={};p[m]={};var r=this.l(k,g,p),t=h.get("useInterimTilesOnError"),u=sb(),y=new Zc(0,0,0,0),z,C,v,w;for(v=n.a;v<=n.f;++v)for(w=n.b;w<=n.g;++w)z=Bg(k,m,v,w,e,g),!d(z)&&
238
z.a&&(z=z.a),d(z)?p[m][z.V.toString()]=z:(C=ue(l,z.V,r,y,u),C||(z=ye(l,z.V,y,u))&&r(m+1,z));r=Object.keys(p).map(Number);r.sort(cb);var u=[],D,y=0;for(v=r.length;y<v;++y)for(D in z=r[y],w=p[z],w)z=w[D],2==z.I()&&u.push(z);this.c=u;yg(b.usedTiles,k,m,n);Ag(b,k,l,e,g,f,m,h.get("preload"));vg(b,k);xg(b,k);return!0};function Vj(b){Fi.call(this,b);this.c=!1;this.K=-1;this.w=NaN;this.u=sb();this.h=this.v=null;this.o=af()}H(Vj,Fi);
239
Vj.prototype.i=function(b,c,d){var e=b.extent,f=b.pixelRatio,g=c.nb?b.skippedFeatureUids:{},h=b.viewState,k=h.projection,h=h.rotation,l=k.B(),m=this.a.T(),n=Hi(this,b,0);Gi(this,"precompose",d,b,n);var p=this.h;if(p&&!p.f()){var r;Za(this.a,"render")?(this.o.canvas.width=d.canvas.width,this.o.canvas.height=d.canvas.height,r=this.o):r=d;var t=r.globalAlpha;r.globalAlpha=c.opacity;c=b.size[0]*f;var u=b.size[1]*f;ei(r,-h,c/2,u/2);p.h(r,f,n,h,g);if(m.s&&k.b&&!wb(l,e)){for(var k=e[0],m=Db(l),y=0;k<l[0];)--y,
240
n=m*y,n=Hi(this,b,n),p.h(r,f,n,h,g),k+=m;y=0;for(k=e[2];k>l[2];)++y,n=m*y,n=Hi(this,b,n),p.h(r,f,n,h,g),k-=m;n=Hi(this,b,0)}ei(r,h,c/2,u/2);r!=d&&(Gi(this,"render",r,b,n),d.drawImage(r.canvas,0,0));r.globalAlpha=t}Gi(this,"postcompose",d,b,n)};Vj.prototype.Z=function(b,c,d,e){if(this.h){var f=this.a,g={};return this.h.Z(b,c.viewState.resolution,c.viewState.rotation,{},function(b){var c=x(b).toString();if(!(c in g))return g[c]=!0,d.call(e,b,f)})}};Vj.prototype.D=function(){tg(this)};
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if this.h is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if !(c in g) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
241
Vj.prototype.j=function(b){function c(b){var c,e=b.c;e?c=e.call(b,m):(e=d.i)&&(c=e(b,m));if(c){if(c){e=!1;if(Array.isArray(c))for(var f=0,g=c.length;f<g;++f)e=dj(r,b,c[f],cj(m,n),this.D,this)||e;else e=dj(r,b,c,cj(m,n),this.D,this)||e;b=e}else b=!1;this.c=this.c||b}}var d=this.a,e=d.T();wg(b.attributions,e.o);xg(b,e);var f=b.viewHints[0],g=b.viewHints[1],h=d.l,k=d.o;if(!this.c&&!h&&f||!k&&g)return!0;var l=b.extent,k=b.viewState,f=k.projection,m=k.resolution,n=b.pixelRatio,g=d.g,p=d.c,h=d.get("renderOrder");
242
void 0===h&&(h=bj);l=ub(l,p*m);p=k.projection.B();e.s&&k.projection.b&&!wb(p,b.extent)&&(b=Math.max(Db(l)/2,Db(p)),l[0]=p[0]-b,l[2]=p[2]+b);if(!this.c&&this.w==m&&this.K==g&&this.v==h&&wb(this.u,l))return!0;this.h=null;this.c=!1;var r=new Yi(.5*m/n,l,m,d.c);Sj(e,l,m,f);if(h){var t=[];Qj(e,l,function(b){t.push(b)},this);t.sort(h);t.forEach(c,this)}else Qj(e,l,c,this);Zi(r);this.w=m;this.K=g;this.v=h;this.u=l;this.h=r;return!0};function Wj(b,c){var d=/\{z\}/g,e=/\{x\}/g,f=/\{y\}/g,g=/\{-y\}/g;return function(h){if(h)return b.replace(d,h[0].toString()).replace(e,h[1].toString()).replace(f,function(){return(-h[2]-1).toString()}).replace(g,function(){var b=c.a?c.a[h[0]]:null;return(b.g-b.b+1+h[2]).toString()})}}function Xj(b,c){for(var d=b.length,e=Array(d),f=0;f<d;++f)e[f]=Wj(b[f],c);return Yj(e)}function Yj(b){return 1===b.length?b[0]:function(c,d,e){if(c)return b[Da((c[1]<<c[0])+c[2],b.length)](c,d,e)}}function Zj(){};function ak(b){He.call(this,{attributions:b.attributions,cacheSize:b.cacheSize,extent:b.extent,logo:b.logo,opaque:b.opaque,projection:b.projection,state:b.state,tileGrid:b.tileGrid,tilePixelRatio:b.tilePixelRatio,wrapX:b.wrapX});this.tileLoadFunction=b.tileLoadFunction;this.tileUrlFunction=this.h?this.h.bind(this):Zj;this.urls=null;if(b.urls){var c=b.urls;this.urls=c;var d=c.join("\n");bk(this,this.h?this.h.bind(this):Xj(c,this.tileGrid),d)}else if(b.url){var c=b.url,d=[],e=/\{(\d)-(\d)\}/.exec(c)||
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if h is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if c is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
243
/\{([a-z])-([a-z])\}/.exec(c);if(e){var f=e[2].charCodeAt(0),g;for(g=e[1].charCodeAt(0);g<=f;++g)d.push(c.replace(e[0],String.fromCharCode(g)))}else d.push(c);d=this.urls=d;bk(this,this.h?this.h.bind(this):Xj(d,this.tileGrid),c)}b.tileUrlFunction&&bk(this,b.tileUrlFunction)}H(ak,He);ak.prototype.u=function(b){b=b.target;switch(b.I()){case 1:S(this,new Le("tileloadstart",b));break;case 2:S(this,new Le("tileloadend",b));break;case 3:S(this,new Le("tileloaderror",b))}};
0 ignored issues
show
Coding Style introduced by
As per coding-style, switch statements should have a default case.
Loading history...
244
function bk(b,c,d){b.tileUrlFunction=c;"undefined"!==typeof d?b.Ba!==d&&(b.Ba=d,b.f()):b.f()}ak.prototype.zc=function(b,c,d){b=this.jb(b,c,d);ie(this.a,b)&&this.a.get(b)};function ck(b,c){Eg.call(this,0,c);this.g=af();this.a=this.g.canvas;this.a.style.width="100%";this.a.style.height="100%";this.a.className="ol-unselectable";b.insertBefore(this.a,b.childNodes[0]||null);this.b=!0;this.c=kc()}H(ck,Eg);ck.prototype.Zb=function(b){return b instanceof $h?new Tj(b):b instanceof ai?new Uj(b):b instanceof ti?new Vj(b):null};
245
function dk(b,c,d){var e=b.j,f=b.g;if(Za(e,c)){var g=d.extent,h=d.pixelRatio,k=d.viewState.rotation,l=d.pixelRatio,m=d.viewState,n=m.resolution;b=qg(b.c,b.a.width/2,b.a.height/2,l/n,-l/n,-m.rotation,-m.center[0],-m.center[1]);g=new ui(f,h,g,b,k);S(e,new lg(c,e,g,d,f,null))}}ck.prototype.X=function(){return"canvas"};
246
ck.prototype.Mb=function(b){if(b){var c=this.g,d=b.pixelRatio,e=Math.round(b.size[0]*d),d=Math.round(b.size[1]*d);this.a.width!=e||this.a.height!=d?(this.a.width=e,this.a.height=d):c.clearRect(0,0,e,d);var f=b.viewState.rotation;Fg(b);dk(this,"precompose",b);var g=b.layerStatesArray;hb(g);ei(c,f,e/2,d/2);var h=b.viewState.resolution,k,l,m,n;k=0;for(l=g.length;k<l;++k)n=g[k],m=n.layer,m=Hg(this,m),ng(n,h)&&"ready"==n.xc&&m.j(b,n)&&m.i(b,n,c);ei(c,-f,e/2,d/2);dk(this,"postcompose",b);this.b||(ae(this.a,
247
!0),this.b=!0);Ig(this,b);b.postRenderFunctions.push(Gg)}else this.b&&(ae(this.a,!1),this.b=!1)};function ek(b){this.a=b}function fk(b){this.a=b}H(fk,ek);fk.prototype.X=function(){return 35632};function gk(b){this.a=b}H(gk,ek);gk.prototype.X=function(){return 35633};function hk(){this.a="precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}H(hk,fk);ba(hk);
248
function ik(){this.a="varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.,0.);gl_Position=h*vec4(c,0.,1.)+offsets;a=d;b=f;}"}H(ik,gk);ba(ik);
249
function jk(b,c){this.j=b.getUniformLocation(c,"j");this.l=b.getUniformLocation(c,"i");this.h=b.getUniformLocation(c,"k");this.i=b.getUniformLocation(c,"h");this.a=b.getAttribLocation(c,"e");this.b=b.getAttribLocation(c,"f");this.g=b.getAttribLocation(c,"c");this.f=b.getAttribLocation(c,"g");this.c=b.getAttribLocation(c,"d")};function kk(b){this.a=void 0!==b?b:[]};function lk(b,c){this.i=b;this.a=c;this.b={};this.c={};this.g={};this.l=this.A=this.h=this.j=null;(this.f=0<=na.indexOf("OES_element_index_uint"))&&c.getExtension("OES_element_index_uint");M(this.i,"webglcontextlost",this.Qd,this);M(this.i,"webglcontextrestored",this.Rd,this)}H(lk,Va);
250
function mk(b,c,d){var e=b.a,f=d.a,g=String(x(d));if(g in b.b)e.bindBuffer(c,b.b[g].buffer);else{var h=e.createBuffer();e.bindBuffer(c,h);var k;34962==c?k=new Float32Array(f):34963==c&&(k=b.f?new Uint32Array(f):new Uint16Array(f));e.bufferData(c,k,35044);b.b[g]={Be:d,buffer:h}}}function nk(b,c){var d=b.a,e=String(x(c)),f=b.b[e];d.isContextLost()||d.deleteBuffer(f.buffer);delete b.b[e]}q=lk.prototype;
251
q.L=function(){Ua(this.i);var b=this.a;if(!b.isContextLost()){for(var c in this.b)b.deleteBuffer(this.b[c].buffer);for(c in this.g)b.deleteProgram(this.g[c]);for(c in this.c)b.deleteShader(this.c[c]);b.deleteFramebuffer(this.h);b.deleteRenderbuffer(this.l);b.deleteTexture(this.A)}};q.Pd=function(){return this.a};
252
function ok(b){if(!b.h){var c=b.a,d=c.createFramebuffer();c.bindFramebuffer(c.FRAMEBUFFER,d);var e=pk(c,1,1),f=c.createRenderbuffer();c.bindRenderbuffer(c.RENDERBUFFER,f);c.renderbufferStorage(c.RENDERBUFFER,c.DEPTH_COMPONENT16,1,1);c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,e,0);c.framebufferRenderbuffer(c.FRAMEBUFFER,c.DEPTH_ATTACHMENT,c.RENDERBUFFER,f);c.bindTexture(c.TEXTURE_2D,null);c.bindRenderbuffer(c.RENDERBUFFER,null);c.bindFramebuffer(c.FRAMEBUFFER,null);b.h=d;
253
b.A=e;b.l=f}return b.h}function qk(b,c){var d=String(x(c));if(d in b.c)return b.c[d];var e=b.a,f=e.createShader(c.X());e.shaderSource(f,c.a);e.compileShader(f);return b.c[d]=f}function rk(b,c,d){var e=x(c)+"/"+x(d);if(e in b.g)return b.g[e];var f=b.a,g=f.createProgram();f.attachShader(g,qk(b,c));f.attachShader(g,qk(b,d));f.linkProgram(g);return b.g[e]=g}q.Qd=function(){Ia(this.b);Ia(this.c);Ia(this.g);this.l=this.A=this.h=this.j=null};q.Rd=function(){};
254
q.pb=function(b){if(b==this.j)return!1;this.a.useProgram(b);this.j=b;return!0};function sk(b,c,d){var e=b.createTexture();b.bindTexture(b.TEXTURE_2D,e);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);void 0!==c&&b.texParameteri(3553,10242,c);void 0!==d&&b.texParameteri(3553,10243,d);return e}function pk(b,c,d){var e=sk(b,void 0,void 0);b.texImage2D(b.TEXTURE_2D,0,b.RGBA,c,d,0,b.RGBA,b.UNSIGNED_BYTE,null);return e}
255
function tk(b,c){var d=sk(b,33071,33071);b.texImage2D(b.TEXTURE_2D,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,c);return d};function uk(b,c){this.u=this.F=void 0;this.A=Gb(c);this.s=[];this.i=[];this.w=void 0;this.c=[];this.g=[];this.D=this.K=void 0;this.b=[];this.v=this.l=null;this.W=void 0;this.ma=mc();this.na=mc();this.$=this.J=void 0;this.oa=mc();this.S=this.P=this.O=void 0;this.ja=[];this.j=[];this.a=[];this.o=null;this.f=[];this.H=[];this.da=void 0}H(uk,kg);
256
function vk(b,c){var d=b.o,e=b.l,f=b.ja,g=b.j,h=c.a;return function(){if(!h.isContextLost()){var b,l;b=0;for(l=f.length;b<l;++b)h.deleteTexture(f[b]);b=0;for(l=g.length;b<l;++b)h.deleteTexture(g[b])}nk(c,d);nk(c,e)}}
257
function wk(b,c,d,e){var f=b.F,g=b.u,h=b.w,k=b.K,l=b.D,m=b.W,n=b.J,p=b.$,r=b.O?1:0,t=b.P,u=b.S,y=b.da,z=Math.cos(t),t=Math.sin(t),C=b.b.length,v=b.a.length,w,D,E,G,F,N;for(w=0;w<d;w+=e)F=c[w]-b.A[0],N=c[w+1]-b.A[1],D=v/8,E=-u*f,G=-u*(h-g),b.a[v++]=F,b.a[v++]=N,b.a[v++]=E*z-G*t,b.a[v++]=E*t+G*z,b.a[v++]=n/l,b.a[v++]=(p+h)/k,b.a[v++]=m,b.a[v++]=r,E=u*(y-f),G=-u*(h-g),b.a[v++]=F,b.a[v++]=N,b.a[v++]=E*z-G*t,b.a[v++]=E*t+G*z,b.a[v++]=(n+y)/l,b.a[v++]=(p+h)/k,b.a[v++]=m,b.a[v++]=r,E=u*(y-f),G=u*g,b.a[v++]=
258
F,b.a[v++]=N,b.a[v++]=E*z-G*t,b.a[v++]=E*t+G*z,b.a[v++]=(n+y)/l,b.a[v++]=p/k,b.a[v++]=m,b.a[v++]=r,E=-u*f,G=u*g,b.a[v++]=F,b.a[v++]=N,b.a[v++]=E*z-G*t,b.a[v++]=E*t+G*z,b.a[v++]=n/l,b.a[v++]=p/k,b.a[v++]=m,b.a[v++]=r,b.b[C++]=D,b.b[C++]=D+1,b.b[C++]=D+2,b.b[C++]=D,b.b[C++]=D+2,b.b[C++]=D+3}uk.prototype.Xa=function(b,c){this.f.push(this.b.length);this.H.push(c);var d=b.a;wk(this,d,d.length,b.b)};uk.prototype.Ya=function(b,c){this.f.push(this.b.length);this.H.push(c);var d=b.a;wk(this,d,d.length,b.b)};
259
function xk(b,c){var d=c.a;b.s.push(b.b.length);b.i.push(b.b.length);b.o=new kk(b.a);mk(c,34962,b.o);b.l=new kk(b.b);mk(c,34963,b.l);var e={};yk(b.ja,b.c,e,d);yk(b.j,b.g,e,d);b.F=void 0;b.u=void 0;b.w=void 0;b.c=null;b.g=null;b.K=void 0;b.D=void 0;b.b=null;b.W=void 0;b.J=void 0;b.$=void 0;b.O=void 0;b.P=void 0;b.S=void 0;b.a=null;b.da=void 0}function yk(b,c,d,e){var f,g,h,k=c.length;for(h=0;h<k;++h)f=c[h],g=x(f).toString(),g in d?f=d[g]:(f=tk(e,f),d[g]=f),b[h]=f}
260
uk.prototype.h=function(b,c,d,e,f,g,h,k,l,m,n){g=b.a;mk(b,34962,this.o);mk(b,34963,this.l);var p=hk.za(),r=ik.za(),r=rk(b,p,r);this.v?p=this.v:this.v=p=new jk(g,r);b.pb(r);g.enableVertexAttribArray(p.g);g.vertexAttribPointer(p.g,2,5126,!1,32,0);g.enableVertexAttribArray(p.a);g.vertexAttribPointer(p.a,2,5126,!1,32,8);g.enableVertexAttribArray(p.c);g.vertexAttribPointer(p.c,2,5126,!1,32,16);g.enableVertexAttribArray(p.b);g.vertexAttribPointer(p.b,1,5126,!1,32,24);g.enableVertexAttribArray(p.f);g.vertexAttribPointer(p.f,
261
1,5126,!1,32,28);r=this.oa;qg(r,0,0,2/(d*f[0]),2/(d*f[1]),-e,-(c[0]-this.A[0]),-(c[1]-this.A[1]));c=this.na;d=2/f[0];f=2/f[1];nc(c);c[0]=d;c[5]=f;c[10]=1;c[15]=1;f=this.ma;nc(f);0!==e&&rc(f,-e);g.uniformMatrix4fv(p.i,!1,r);g.uniformMatrix4fv(p.l,!1,c);g.uniformMatrix4fv(p.j,!1,f);g.uniform1f(p.h,h);var t;if(void 0===l)zk(this,g,b,k,this.ja,this.s);else{if(m)a:{e=b.f?5125:5123;b=b.f?4:2;f=this.f.length-1;for(h=this.j.length-1;0<=h;--h)for(g.bindTexture(3553,this.j[h]),m=0<h?this.i[h-1]:0,c=this.i[h];0<=
262
f&&this.f[f]>=m;){t=this.f[f];d=this.H[f];r=x(d).toString();if(void 0===k[r]&&d.M()&&(void 0===n||Jb(n,d.M().B()))&&(g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT),g.drawElements(4,c-t,e,t*b),c=l(d))){k=c;break a}c=t;f--}k=void 0}else g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT),zk(this,g,b,k,this.j,this.i),k=(k=l(null))?k:void 0;t=k}g.disableVertexAttribArray(p.g);g.disableVertexAttribArray(p.a);g.disableVertexAttribArray(p.c);g.disableVertexAttribArray(p.b);g.disableVertexAttribArray(p.f);return t};
263
function zk(b,c,d,e,f,g){var h=d.f?5125:5123;d=d.f?4:2;if(Ka(e)){var k;b=0;e=f.length;for(k=0;b<e;++b){c.bindTexture(3553,f[b]);var l=g[b];c.drawElements(4,l-k,h,k*d);k=l}}else{k=0;var m,l=0;for(m=f.length;l<m;++l){c.bindTexture(3553,f[l]);for(var n=0<l?g[l-1]:0,p=g[l],r=n;k<b.f.length&&b.f[k]<=p;){var t=x(b.H[k]).toString();void 0!==e[t]?(r!==n&&c.drawElements(4,n-r,h,r*d),n=r=k===b.f.length-1?p:b.f[k+1]):n=k===b.f.length-1?p:b.f[k+1];k++}r!==n&&c.drawElements(4,n-r,h,r*d)}}}
264
uk.prototype.Ha=function(b){var c=b.i,d=b.b,e=b.H,f=b.h,g=b.l,h=b.ua(),k=b.A,l=b.N(),m=b.j;b=b.bb;var n;0===this.c.length?this.c.push(d):(n=this.c[this.c.length-1],x(n)!=x(d)&&(this.s.push(this.b.length),this.c.push(d)));0===this.g.length?this.g.push(f):(n=this.g[this.g.length-1],x(n)!=x(f)&&(this.i.push(this.b.length),this.g.push(f)));this.F=c[0];this.u=c[1];this.w=m[1];this.K=e[1];this.D=e[0];this.W=g;this.J=h[0];this.$=h[1];this.P=l;this.O=k;this.S=b;this.da=m[0]};
265
function Ak(b,c,d){this.c=c;this.i=b;this.g=d;this.b={}}function Bk(b,c){var d=[],e;for(e in b.b)d.push(vk(b.b[e],c));return function(){for(var b=d.length,c,e=0;e<b;e++)c=d[e].apply(this,arguments);return c}}function Ck(b,c){for(var d in b.b)xk(b.b[d],c)}Ak.prototype.a=function(b,c){var d=this.b[c];void 0===d&&(d=new Dk[c](this.i,this.c),this.b[c]=d);return d};Ak.prototype.f=function(){return Ka(this.b)};
266
Ak.prototype.h=function(b,c,d,e,f,g,h,k){var l,m,n;l=0;for(m=Ii.length;l<m;++l)n=this.b[Ii[l]],void 0!==n&&n.h(b,c,d,e,f,g,h,k,void 0,!1)};function Ek(b,c,d,e,f,g,h,k,l,m){var n=Fk,p,r;for(p=Ii.length-1;0<=p;--p)if(r=b.b[Ii[p]],void 0!==r&&(r=r.h(c,d,e,f,n,g,h,k,l,!0,m)))return r}
0 ignored issues
show
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
267
Ak.prototype.Z=function(b,c,d,e,f,g,h,k,l,m){var n=c.a;n.bindFramebuffer(n.FRAMEBUFFER,ok(c));var p;void 0!==this.g&&(p=ub(yb(b),e*this.g));return Ek(this,c,b,e,f,h,k,l,function(b){var c=new Uint8Array(4);n.readPixels(0,0,1,1,n.RGBA,n.UNSIGNED_BYTE,c);if(0<c[3]&&(b=m(b)))return b},p)};var Dk={Image:uk},Fk=[1,1];function Gk(b,c,d,e,f,g,h){this.a=b;this.f=c;this.g=g;this.c=h;this.j=f;this.i=e;this.h=d;this.b=null}H(Gk,kg);Gk.prototype.Ya=function(b,c){var d=this.a,e=(new Ak(1,this.g)).a(0,"Image");e.Ha(this.b);e.Ya(b,c);xk(e,d);e.h(this.a,this.f,this.h,this.i,this.j,this.c,1,{},void 0,!1);vk(e,d)()};Gk.prototype.Xa=function(b,c){var d=this.a,e=(new Ak(1,this.g)).a(0,"Image");e.Ha(this.b);e.Xa(b,c);xk(e,d);e.h(this.a,this.f,this.h,this.i,this.j,this.c,1,{},void 0,!1);vk(e,d)()};
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if 0 < c.3 && b = m(b) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
268
Gk.prototype.Ha=function(b){this.b=b};function Hk(){this.a="precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}"}H(Hk,fk);ba(Hk);function Ik(){this.a="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}"}H(Ik,gk);ba(Ik);
269
function Jk(b,c){this.f=b.getUniformLocation(c,"f");this.g=b.getUniformLocation(c,"e");this.h=b.getUniformLocation(c,"d");this.c=b.getUniformLocation(c,"g");this.a=b.getAttribLocation(c,"b");this.b=b.getAttribLocation(c,"c")};function Kk(b,c){sg.call(this,c);this.c=b;this.O=new kk([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]);this.i=this.ia=null;this.j=void 0;this.v=kc();this.J=mc();this.s=null}H(Kk,sg);
270
function Lk(b,c,d){var e=b.c.g;if(void 0===b.j||b.j!=d){c.postRenderFunctions.push(function(b,c,d){b.isContextLost()||(b.deleteFramebuffer(c),b.deleteTexture(d))}.bind(null,e,b.i,b.ia));c=pk(e,d,d);var f=e.createFramebuffer();e.bindFramebuffer(36160,f);e.framebufferTexture2D(36160,36064,3553,c,0);b.ia=c;b.i=f;b.j=d}else e.bindFramebuffer(36160,b.i)}
271
Kk.prototype.qc=function(b,c,d){Mk(this,"precompose",d,b);mk(d,34962,this.O);var e=d.a,f=Hk.za(),g=Ik.za(),f=rk(d,f,g);this.s?g=this.s:this.s=g=new Jk(e,f);d.pb(f)&&(e.enableVertexAttribArray(g.a),e.vertexAttribPointer(g.a,2,5126,!1,16,0),e.enableVertexAttribArray(g.b),e.vertexAttribPointer(g.b,2,5126,!1,16,8),e.uniform1i(g.c,0));e.uniformMatrix4fv(g.h,!1,this.v);e.uniformMatrix4fv(g.g,!1,this.J);e.uniform1f(g.f,c.opacity);e.bindTexture(3553,this.ia);e.drawArrays(5,0,4);Mk(this,"postcompose",d,b)};
272
function Mk(b,c,d,e){b=b.a;if(Za(b,c)){var f=e.viewState;S(b,new lg(c,b,new Gk(d,f.center,f.resolution,f.rotation,e.size,e.extent,e.pixelRatio),e,null,d))}}Kk.prototype.F=function(){this.i=this.ia=null;this.j=void 0};function Nk(b,c){Kk.call(this,b,c);this.b=null}H(Nk,Kk);function Ok(b,c){var d=c.b();return tk(b.c.g,d)}Nk.prototype.Z=function(b,c,d,e){var f=this.a;return f.T().Z(b,c.viewState.resolution,c.viewState.rotation,c.skippedFeatureUids,function(b){return d.call(e,b,f)})};
273
Nk.prototype.Kb=function(b,c){var d=this.c.g,e=b.pixelRatio,f=b.viewState,g=f.center,h=f.resolution,k=f.rotation,l=this.b,m=this.ia,n=this.a.T(),p=b.viewHints,r=b.extent;void 0!==c.extent&&(r=Ib(r,c.extent));p[0]||p[1]||Cb(r)||(f=sj(n,r,h,e,f.projection))&&ug(this,f)&&(l=f,m=Ok(this,f),this.ia&&b.postRenderFunctions.push(function(b,c){b.isContextLost()||b.deleteTexture(c)}.bind(null,d,this.ia)));l&&(d=this.c.c.i,Pk(this,d.width,d.height,e,g,h,k,l.B()),e=this.v,nc(e),qc(e,1,-1),pc(e,0,-1),this.b=l,
274
this.ia=m,wg(b.attributions,l.c),xg(b,n));return!0};function Pk(b,c,d,e,f,g,h,k){c*=g;d*=g;b=b.J;nc(b);qc(b,2*e/c,2*e/d);rc(b,-h);pc(b,k[0]-f[0],k[1]-f[1]);qc(b,(k[2]-k[0])/2,(k[3]-k[1])/2);pc(b,1,1)};function Qk(){this.a="precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}"}H(Qk,fk);ba(Qk);function Rk(){this.a="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}"}H(Rk,gk);ba(Rk);function Sk(b,c){this.f=b.getUniformLocation(c,"e");this.g=b.getUniformLocation(c,"d");this.a=b.getAttribLocation(c,"b");this.b=b.getAttribLocation(c,"c")};function Tk(b,c){Kk.call(this,b,c);this.K=Qk.za();this.S=Rk.za();this.b=null;this.w=new kk([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]);this.u=this.h=null;this.o=-1;this.D=[0,0]}H(Tk,Kk);Tk.prototype.L=function(){nk(this.c.c,this.w);Tk.R.L.call(this)};Tk.prototype.l=function(b,c,d){var e=this.c;return function(f,g){return Ie(b,c,f,g,function(b){var c=ie(e.b,b.getKey());c&&(d[f]||(d[f]={}),d[f][b.V.toString()]=b);return c})}};Tk.prototype.F=function(){Tk.R.F.call(this);this.b=null};
275
Tk.prototype.Kb=function(b,c,d){var e=this.c,f=d.a,g=b.viewState,h=g.projection,k=this.a,l=k.T(),m=l.qa(h),n=De(m,g.resolution),p=m.G(n),r=Je(l,n,h),t=r[0]/oe(Ce(m,n),this.D)[0],u=p/t,y=l.Fb(h),z=g.center,C;p==g.resolution?(z=zg(z,p,b.size),C=Hb(z,p,g.rotation,b.size)):C=b.extent;p=ze(m,C,p);if(this.h&&ad(this.h,p)&&this.o==l.g)u=this.u;else{var v=[p.ga(),p.g-p.b+1],w=Math.pow(2,Math.ceil(Math.log(Math.max(v[0]*r[0],v[1]*r[1]))/Math.LN2)),v=u*w,D=m.ua(n),E=D[0]+p.a*r[0]*u,u=D[1]+p.b*r[1]*u,u=[E,u,
276
E+v,u+v];Lk(this,b,w);f.viewport(0,0,w,w);f.clearColor(0,0,0,0);f.clear(16384);f.disable(3042);w=rk(d,this.K,this.S);d.pb(w);this.b||(this.b=new Sk(f,w));mk(d,34962,this.w);f.enableVertexAttribArray(this.b.a);f.vertexAttribPointer(this.b.a,2,5126,!1,16,0);f.enableVertexAttribArray(this.b.b);f.vertexAttribPointer(this.b.b,2,5126,!1,16,8);f.uniform1i(this.b.f,0);d={};d[n]={};var G=this.l(l,h,d),F=k.get("useInterimTilesOnError"),w=!0,E=sb(),N=new Zc(0,0,0,0),A,J,P;for(J=p.a;J<=p.f;++J)for(P=p.b;P<=p.g;++P){D=
277
Bg(l,n,J,P,t,h);if(void 0!==c.extent&&(A=ve(m,D.V,E),!Jb(A,c.extent)))continue;A=D.I();A=2==A||4==A||3==A&&!F;!A&&D.a&&(D=D.a);A=D.I();if(2==A){if(ie(e.b,D.getKey())){d[n][D.V.toString()]=D;continue}}else if(4==A||3==A&&!F)continue;w=!1;A=ue(m,D.V,G,N,E);A||(D=ye(m,D.V,N,E))&&G(n+1,D)}c=Object.keys(d).map(Number);c.sort(cb);for(var G=new Float32Array(4),K,Q,O,F=0,N=c.length;F<N;++F)for(K in Q=d[c[F]],Q)D=Q[K],A=ve(m,D.V,E),J=2*(A[2]-A[0])/v,P=2*(A[3]-A[1])/v,O=2*(A[0]-u[0])/v-1,A=2*(A[1]-u[1])/v-
278
1,jc(G,J,P,O,A),f.uniform4fv(this.b.g,G),Uk(e,D,r,y*t),f.drawArrays(5,0,4);w?(this.h=p,this.u=u,this.o=l.g):(this.u=this.h=null,this.o=-1,b.animate=!0)}yg(b.usedTiles,l,n,p);var za=e.i;Ag(b,l,m,t,h,C,n,k.get("preload"),function(b){var c;(c=2!=b.I()||ie(e.b,b.getKey()))||(c=b.getKey()in za.f);c||za.g([b,Be(m,b.V),m.G(b.V[0]),r,y*t])},this);vg(b,l);xg(b,l);f=this.v;nc(f);pc(f,(z[0]-u[0])/(u[2]-u[0]),(z[1]-u[1])/(u[3]-u[1]));0!==g.rotation&&rc(f,g.rotation);qc(f,b.size[0]*g.resolution/(u[2]-u[0]),b.size[1]*
279
g.resolution/(u[3]-u[1]));pc(f,-.5,-.5);return!0};function Vk(b,c){Kk.call(this,b,c);this.h=!1;this.D=-1;this.K=NaN;this.u=sb();this.o=this.b=this.w=null}H(Vk,Kk);q=Vk.prototype;q.qc=function(b,c,d){this.o=c;var e=b.viewState,f=this.b;f&&!f.f()&&f.h(d,e.center,e.resolution,e.rotation,b.size,b.pixelRatio,c.opacity,c.nb?b.skippedFeatureUids:{})};q.L=function(){var b=this.b;b&&(Bk(b,this.c.c)(),this.b=null);Vk.R.L.call(this)};
280
q.Z=function(b,c,d,e){if(this.b&&this.o){var f=c.viewState,g=this.a,h={};return this.b.Z(b,this.c.c,f.center,f.resolution,f.rotation,c.size,c.pixelRatio,this.o.opacity,{},function(b){var c=x(b).toString();if(!(c in h))return h[c]=!0,d.call(e,b,g)})}};q.rc=function(){tg(this)};
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if !(c in h) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if this.b && this.o is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
281
q.Kb=function(b,c,d){function e(b){var c,d=b.c;d?c=d.call(b,m):(d=f.i)&&(c=d(b,m));if(c){if(c){d=!1;if(Array.isArray(c))for(var e=0,g=c.length;e<g;++e)d=dj(r,b,c[e],cj(m,n),this.rc,this)||d;else d=dj(r,b,c,cj(m,n),this.rc,this)||d;b=d}else b=!1;this.h=this.h||b}}var f=this.a;c=f.T();wg(b.attributions,c.o);xg(b,c);var g=b.viewHints[0],h=b.viewHints[1],k=f.l,l=f.o;if(!this.h&&!k&&g||!l&&h)return!0;var h=b.extent,k=b.viewState,g=k.projection,m=k.resolution,n=b.pixelRatio,k=f.g,p=f.c,l=f.get("renderOrder");
282
void 0===l&&(l=bj);h=ub(h,p*m);if(!this.h&&this.K==m&&this.D==k&&this.w==l&&wb(this.u,h))return!0;this.b&&b.postRenderFunctions.push(Bk(this.b,d));this.h=!1;var r=new Ak(.5*m/n,h,f.c);Sj(c,h,m,g);if(l){var t=[];Qj(c,h,function(b){t.push(b)},this);t.sort(l);t.forEach(e,this)}else Qj(c,h,e,this);Ck(r,d);this.K=m;this.D=k;this.w=l;this.u=h;this.b=r;return!0};function Wk(b,c){Eg.call(this,0,c);this.a=document.createElement("CANVAS");this.a.style.width="100%";this.a.style.height="100%";this.a.className="ol-unselectable";b.insertBefore(this.a,b.childNodes[0]||null);this.o=this.s=0;this.F=af();this.l=!0;this.g=cf(this.a,{antialias:!0,depth:!1,failIfMajorPerformanceCaveat:!0,preserveDrawingBuffer:!1,stencil:!0});this.c=new lk(this.a,this.g);M(this.a,"webglcontextlost",this.Md,this);M(this.a,"webglcontextrestored",this.Nd,this);this.b=new he;this.H=null;this.i=
283
new Jg(function(b){var c=b[1];b=b[2];var f=c[0]-this.H[0],c=c[1]-this.H[1];return 65536*Math.log(b)+Math.sqrt(f*f+c*c)/b}.bind(this),function(b){return b[0].getKey()});this.u=function(){if(0!==this.i.a.length){Ng(this.i);var b=Kg(this.i);Uk(this,b[0],b[3],b[4])}return!1}.bind(this);this.h=0;Xk(this)}H(Wk,Eg);
284
function Uk(b,c,d,e){var f=b.g,g=c.getKey();if(ie(b.b,g))b=b.b.get(g),f.bindTexture(3553,b.ia),9729!=b.nc&&(f.texParameteri(3553,10240,9729),b.nc=9729),9729!=b.oc&&(f.texParameteri(3553,10240,9729),b.oc=9729);else{var h=f.createTexture();f.bindTexture(3553,h);if(0<e){var k=b.F.canvas,l=b.F;b.s!==d[0]||b.o!==d[1]?(k.width=d[0],k.height=d[1],b.s=d[0],b.o=d[1]):l.clearRect(0,0,d[0],d[1]);l.drawImage(c.ra(),e,e,d[0],d[1],0,0,d[0],d[1]);f.texImage2D(3553,0,6408,6408,5121,k)}else f.texImage2D(3553,0,6408,
285
6408,5121,c.ra());f.texParameteri(3553,10240,9729);f.texParameteri(3553,10241,9729);f.texParameteri(3553,10242,33071);f.texParameteri(3553,10243,33071);b.b.set(g,{ia:h,nc:9729,oc:9729})}}q=Wk.prototype;q.Zb=function(b){return b instanceof $h?new Nk(this,b):b instanceof ai?new Tk(this,b):b instanceof ti?new Vk(this,b):null};function Yk(b,c,d){var e=b.j;if(Za(e,c)){b=b.c;var f=d.viewState;S(e,new lg(c,e,new Gk(b,f.center,f.resolution,f.rotation,d.size,d.extent,d.pixelRatio),d,null,b))}}
286
q.L=function(){var b=this.g;b.isContextLost()||je(this.b,function(c){c&&b.deleteTexture(c.ia)});Wa(this.c);Wk.R.L.call(this)};q.Mc=function(b,c){for(var d=this.g,e;1024<this.b.f-this.h;){if(e=this.b.a.Ia)d.deleteTexture(e.ia);else if(+this.b.a.Ba==c.index)break;else--this.h;this.b.pop()}};q.X=function(){return"webgl"};q.Md=function(b){b.preventDefault();this.b.clear();this.h=0;b=this.f;for(var c in b)b[c].F()};q.Nd=function(){Xk(this);this.j.render()};
287
function Xk(b){b=b.g;b.activeTexture(33984);b.blendFuncSeparate(770,771,1,771);b.disable(2884);b.disable(2929);b.disable(3089);b.disable(2960)}
288
q.Mb=function(b){var c=this.c,d=this.g;if(d.isContextLost())return!1;if(!b)return this.l&&(ae(this.a,!1),this.l=!1),!1;this.H=b.focus;this.b.set((-b.index).toString(),null);++this.h;Yk(this,"precompose",b);var e=[],f=b.layerStatesArray;hb(f);var g=b.viewState.resolution,h,k,l,m;h=0;for(k=f.length;h<k;++h)m=f[h],ng(m,g)&&"ready"==m.xc&&(l=Hg(this,m.layer),l.Kb(b,m,c)&&e.push(m));f=b.size[0]*b.pixelRatio;g=b.size[1]*b.pixelRatio;if(this.a.width!=f||this.a.height!=g)this.a.width=f,this.a.height=g;d.bindFramebuffer(36160,
289
null);d.clearColor(0,0,0,0);d.clear(16384);d.enable(3042);d.viewport(0,0,this.a.width,this.a.height);h=0;for(k=e.length;h<k;++h)m=e[h],l=Hg(this,m.layer),l.qc(b,m,c);this.l||(ae(this.a,!0),this.l=!0);Fg(b);1024<this.b.f-this.h&&b.postRenderFunctions.push(this.Mc.bind(this));0!==this.i.a.length&&(b.postRenderFunctions.push(this.u),b.animate=!0);Yk(this,"postcompose",b);Ig(this,b);b.postRenderFunctions.push(Gg)};
0 ignored issues
show
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
290
q.Z=function(b,c,d,e,f,g){var h;if(this.g.isContextLost())return!1;var k=c.viewState,l=c.layerStatesArray,m;for(m=l.length-1;0<=m;--m){h=l[m];var n=h.layer;if(ng(h,k.resolution)&&f.call(g,n)&&(h=Hg(this,n).Z(b,c,d,e)))return h}};var Zk=["canvas","webgl","dom"];
0 ignored issues
show
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
291
function Z(b){T.call(this);var c=$k(b);this.hb=void 0!==b.loadTilesWhileAnimating?b.loadTilesWhileAnimating:!1;this.tb=void 0!==b.loadTilesWhileInteracting?b.loadTilesWhileInteracting:!1;this.vb=void 0!==b.pixelRatio?b.pixelRatio:jf;this.ub=c.logos;this.P=function(){this.h=void 0;this.de.call(this,Date.now())}.bind(this);this.Ja=kc();this.wb=kc();this.gb=0;this.b=null;this.oa=sb();this.u=this.D=null;this.a=document.createElement("DIV");this.a.className="ol-viewport"+(mf?" ol-touch":"");this.a.style.position=
292
"relative";this.a.style.overflow="hidden";this.a.style.width="100%";this.a.style.height="100%";this.a.style.msTouchAction="none";this.a.style.a="none";this.o=document.createElement("DIV");this.o.className="ol-overlaycontainer";this.a.appendChild(this.o);this.l=document.createElement("DIV");this.l.className="ol-overlaycontainer-stopevent";b=["click","dblclick","mousedown","touchstart","mspointerdown",eg,"mousewheel","wheel"];for(var d=0,e=b.length;d<e;++d)M(this.l,b[d],Xa);this.a.appendChild(this.l);
293
this.ma=new Xf(this);for(var f in hg)M(this.ma,hg[f],this.kc,this);this.S=c.keyboardEventTarget;this.j=null;M(this.a,"wheel",this.Na,this);M(this.a,"mousewheel",this.Na,this);this.s=c.controls;this.i=c.interactions;this.v=c.overlays;this.uc={};this.O=new c.fe(this.a,this);this.J=null;this.w=[];this.na=[];this.ta=new Og(this.Uc.bind(this),this.pd.bind(this));this.sb={};M(this,U("layergroup"),this.Zc,this);M(this,U("view"),this.qd,this);M(this,U("size"),this.md,this);M(this,U("target"),this.od,this);
294
this.F(c.values);this.s.forEach(function(b){b.setMap(this)},this);M(this.s,"add",function(b){b.element.setMap(this)},this);M(this.s,"remove",function(b){b.element.setMap(null)},this);this.i.forEach(function(b){b.setMap(this)},this);M(this.i,"add",function(b){b.element.setMap(this)},this);M(this.i,"remove",function(b){b.element.setMap(null)},this);this.v.forEach(this.Ub,this);M(this.v,"add",function(b){this.Ub(b.element)},this);M(this.v,"remove",function(b){var c=b.element.ya();void 0!==c&&delete this.uc[c.toString()];
295
b.element.setMap(null)},this)}H(Z,T);q=Z.prototype;q.Ic=function(b){this.s.push(b)};q.Jc=function(b){this.i.push(b)};q.Tb=function(b){Nh(al(this)).push(b)};q.Ub=function(b){var c=b.ya();void 0!==c&&(this.uc[c.toString()]=b);b.setMap(this)};q.ea=function(b){this.render();Array.prototype.push.apply(this.w,arguments)};
296
q.L=function(){Wa(this.ma);Wa(this.O);Ta(this.a,"wheel",this.Na,this);Ta(this.a,"mousewheel",this.Na,this);void 0!==this.c&&(I.removeEventListener("resize",this.c,!1),this.c=void 0);this.h&&(I.cancelAnimationFrame(this.h),this.h=void 0);this.set("target",null);Z.R.L.call(this)};q.Nc=function(b,c,d,e,f){if(this.b)return b=this.pa(b),this.O.Z(b,this.b,c,void 0!==d?d:null,void 0!==e?e:Mb,void 0!==f?f:null)};q.Oc=function(b){return this.pa(Ue(this,b))};
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if this.b is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
297
function Ue(b,c){var d=b.a.getBoundingClientRect(),e=c.changedTouches?c.changedTouches[0]:c;return[e.clientX-d.left,e.clientY-d.top]}q.$a=function(){var b=this.get("target");return void 0!==b?Nd(b):null};q.pa=function(b){var c=this.b;return c?(b=b.slice(),rg(c.pixelToCoordinateMatrix,b,b)):null};function al(b){return b.get("layergroup")}q.pc=function(){return Nh(al(this))};function jh(b,c){var d=b.b;if(d){var e=c.slice(0,2);return rg(d.coordinateToPixelMatrix,e,e)}return null}q.ba=function(){return this.get("size")};
298
q.C=function(){return this.get("view")};q.Uc=function(b,c,d,e){var f=this.b;if(!(f&&c in f.wantedTiles&&f.wantedTiles[c][b.V.toString()]))return Infinity;b=d[0]-f.focus[0];d=d[1]-f.focus[1];return 65536*Math.log(e)+Math.sqrt(b*b+d*d)/e};q.Na=function(b,c){var d=new Vf(c||b.type,this,b);this.kc(d)};q.kc=function(b){if(this.b){this.J=b.coordinate;b.frameState=this.b;var c=this.i.a,d;if(!1!==S(this,b))for(d=c.length-1;0<=d;d--){var e=c[d];if(e.get("active")&&!e.handleEvent(b))break}}};
299
q.ld=function(){var b=this.b,c=this.ta;if(0!==c.a.length){var d=16,e=d;if(b){var f=b.viewHints;f[0]&&(d=this.hb?8:0,e=2);f[1]&&(d=this.tb?8:0,e=2)}if(c.h<d){Ng(c);for(var f=0,g,h;c.h<d&&f<e&&0<c.a.length;)g=Kg(c)[0],h=g.getKey(),0!==g.I()||h in c.c||(c.c[h]=!0,++c.h,++f,g.load())}}c=this.na;d=0;for(e=c.length;d<e;++d)c[d](this,b);c.length=0};q.md=function(){this.render()};
300
q.od=function(){var b;this.get("target")&&(b=this.$a());if(this.j){for(var c=0,d=this.j.length;c<d;++c)L(this.j[c]);this.j=null}b?(b.appendChild(this.a),b=this.S?this.S:b,this.j=[M(b,"keydown",this.Na,this),M(b,"keypress",this.Na,this)],this.c||(this.c=this.fb.bind(this),I.addEventListener("resize",this.c,!1))):(Td(this.a),void 0!==this.c&&(I.removeEventListener("resize",this.c,!1),this.c=void 0));this.fb()};q.pd=function(){this.render()};q.rd=function(){this.render()};
301
q.qd=function(){this.D&&(L(this.D),this.D=null);var b=this.C();b&&(this.D=M(b,"propertychange",this.rd,this));this.render()};q.$c=function(){this.render()};q.ad=function(){this.render()};q.Zc=function(){this.u&&(this.u.forEach(L),this.u=null);var b=al(this);b&&(this.u=[M(b,"propertychange",this.ad,this),M(b,"change",this.$c,this)]);this.render()};q.ee=function(){this.h&&I.cancelAnimationFrame(this.h);this.P()};q.render=function(){void 0===this.h&&(this.h=I.requestAnimationFrame(this.P))};q.ae=function(b){return this.i.remove(b)};
302
q.be=function(b){return Nh(al(this)).remove(b)};
303
q.de=function(b){var c,d,e,f=this.ba(),g=this.C(),h=sb(),k=null;if(void 0!==f&&0<f[0]&&0<f[1]&&g&&Rc(g)){c=this.b?this.b.viewHints:void 0;void 0!==c?(c[0]=g.b[0],c[1]=g.b[1],k=c):k=g.b.slice();var l=al(this).Gb(),m={};c=0;for(d=l.length;c<d;++c)m[x(l[c].layer)]=l[c];e=g.I();k={animate:!1,attributions:{},coordinateToPixelMatrix:this.Ja,extent:h,focus:this.J?this.J:e.center,index:this.gb++,layerStates:m,layerStatesArray:l,logos:Ha({},this.ub),pixelRatio:this.vb,pixelToCoordinateMatrix:this.wb,postRenderFunctions:[],
304
size:f,skippedFeatureUids:this.sb,tileQueue:this.ta,time:b,usedTiles:{},viewState:e,viewHints:k,wantedTiles:{}}}if(k){b=this.w;c=f=0;for(d=b.length;c<d;++c)g=b[c],g(this,k)&&(b[f++]=g);b.length=f;k.extent=Hb(e.center,e.resolution,e.rotation,k.size,h)}this.b=k;this.O.Mb(k);k&&(k.animate&&this.render(),Array.prototype.push.apply(this.na,k.postRenderFunctions),0!==this.w.length||k.viewHints[0]||k.viewHints[1]||zb(k.extent,this.oa)||(S(this,new fe("moveend",this,k)),vb(k.extent,this.oa)));S(this,new fe("postrender",
305
this,k));c=h=this.ld;this&&(c=ma(h,this));!ga(aa.setImmediate)||aa.Window&&aa.Window.prototype&&!pd("Edge")&&aa.Window.prototype.setImmediate==aa.setImmediate?(Ve||(Ve=We()),Ve(c)):aa.setImmediate(c)};
306
q.fb=function(){var b=this.$a();if(b){var c=Md(b),d=ud&&b.currentStyle,e;if(e=d)Kd(c),e=!0;if(e&&"auto"!=d.width&&"auto"!=d.height&&!d.boxSizing)c=be(b,d.width,"width","pixelWidth"),b=be(b,d.height,"height","pixelHeight"),b=new Jd(c,b);else{d=new Jd(b.offsetWidth,b.offsetHeight);if(ud){c=ce(b,"paddingLeft");e=ce(b,"paddingRight");var f=ce(b,"paddingTop"),g=ce(b,"paddingBottom"),c=new Wd(f,e,g,c)}else c=Xd(b,"paddingLeft"),e=Xd(b,"paddingRight"),f=Xd(b,"paddingTop"),g=Xd(b,"paddingBottom"),c=new Wd(parseFloat(f),
307
parseFloat(e),parseFloat(g),parseFloat(c));!ud||9<=Number(Gd)?(e=Xd(b,"borderLeftWidth"),f=Xd(b,"borderRightWidth"),g=Xd(b,"borderTopWidth"),b=Xd(b,"borderBottomWidth"),b=new Wd(parseFloat(g),parseFloat(f),parseFloat(b),parseFloat(e))):(e=ee(b,"borderLeft"),f=ee(b,"borderRight"),g=ee(b,"borderTop"),b=ee(b,"borderBottom"),b=new Wd(g,f,b,e));b=new Jd(d.width-b.left-c.left-c.right-b.right,d.height-b.top-c.top-c.bottom-b.bottom)}this.set("size",[b.width,b.height])}else this.set("size",void 0)};
308
function $k(b){var c=null;void 0!==b.keyboardEventTarget&&(c="string"===typeof b.keyboardEventTarget?document.getElementById(b.keyboardEventTarget):b.keyboardEventTarget);var d={},e={};if(void 0===b.logo||"boolean"===typeof b.logo&&b.logo)e["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszWWMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvYasvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvXH1ZkIFRka8rWbMvXIFVkIFVjIFVkbMvWH1VjbMvWIFVlbcvWIFVla8vVIFVkbMvWbMvVH1VkbMvWIFVlbcvWIFVkbcvVbMvWjNPbIFVkU8LPwMzNIFVkbczWIFVkbsvWbMvXIFVkRnB8bcvW2+TkW8XRIFVkIlZlJVloJlpoKlxrLl9tMmJwOWd0Omh1RXF8TneCT3iDUHiDU8LPVMLPVcLPVcPQVsPPVsPQV8PQWMTQWsTQW8TQXMXSXsXRX4SNX8bSYMfTYcfTYsfTY8jUZcfSZsnUaIqTacrVasrVa8jTa8rWbI2VbMvWbcvWdJObdcvUdszUd8vVeJaee87Yfc3WgJyjhqGnitDYjaarldPZnrK2oNbborW5o9bbo9fbpLa6q9ndrL3ArtndscDDutzfu8fJwN7gwt7gxc/QyuHhy+HizeHi0NfX0+Pj19zb1+Tj2uXk29/e3uLg3+Lh3+bl4uXj4ufl4+fl5Ofl5ufl5ujm5+jmySDnBAAAAFp0Uk5TAAECAgMEBAYHCA0NDg4UGRogIiMmKSssLzU7PkJJT1JTVFliY2hrdHZ3foSFhYeJjY2QkpugqbG1tre5w8zQ09XY3uXn6+zx8vT09vf4+Pj5+fr6/P39/f3+gz7SsAAAAVVJREFUOMtjYKA7EBDnwCPLrObS1BRiLoJLnte6CQy8FLHLCzs2QUG4FjZ5GbcmBDDjxJBXDWxCBrb8aM4zbkIDzpLYnAcE9VXlJSWlZRU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7ahgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCnB3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDgq82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC"]=
309
"http://openlayers.org/";else{var f=b.logo;"string"===typeof f?e[f]="":f instanceof HTMLElement?e[x(f).toString()]=f:ha(f)&&(e[f.src]=f.href)}f=b.layers instanceof Mh?b.layers:new Mh({layers:b.layers});d.layergroup=f;d.target=b.target;d.view=void 0!==b.view?b.view:new X;var f=Eg,g;void 0!==b.renderer?Array.isArray(b.renderer)?g=b.renderer:"string"===typeof b.renderer&&(g=[b.renderer]):g=Zk;var h,k;h=0;for(k=g.length;h<k;++h){var l=g[h];if("canvas"==l){if(lf){f=ck;break}}else if("webgl"==l&&df){f=
310
Wk;break}}void 0!==b.controls?g=Array.isArray(b.controls)?new ed(b.controls.slice()):b.controls:(g={},h=new ed,(void 0!==g.zoom?g.zoom:1)&&h.push(new Qe(g.zoomOptions)),(void 0!==g.rotate?g.rotate:1)&&h.push(new Oe(g.rotateOptions)),(void 0!==g.attribution?g.attribution:1)&&h.push(new Me(g.attributionOptions)),g=h);if(void 0!==b.interactions)h=Array.isArray(b.interactions)?new ed(b.interactions.slice()):b.interactions;else{h={};k=new ed;l=new Pg;(void 0!==h.altShiftDragRotate?h.altShiftDragRotate:
311
1)&&k.push(new kh);(void 0!==h.doubleClickZoom?h.doubleClickZoom:1)&&k.push(new Vg({delta:h.zoomDelta,duration:h.zoomDuration}));(void 0!==h.dragPan?h.dragPan:1)&&k.push(new fh({kinetic:l}));(void 0!==h.pinchRotate?h.pinchRotate:1)&&k.push(new Eh);(void 0!==h.pinchZoom?h.pinchZoom:1)&&k.push(new Ih({duration:h.zoomDuration}));if(void 0!==h.keyboard?h.keyboard:1)k.push(new yh),k.push(new Ah({delta:h.zoomDelta,duration:h.zoomDuration}));(void 0!==h.mouseWheelZoom?h.mouseWheelZoom:1)&&k.push(new Ch({duration:h.zoomDuration}));
312
(void 0!==h.shiftDragZoom?h.shiftDragZoom:1)&&k.push(new xh({duration:h.zoomDuration}));h=k}b=void 0!==b.overlays?Array.isArray(b.overlays)?new ed(b.overlays.slice()):b.overlays:new ed;return{controls:g,interactions:h,keyboardEventTarget:c,logos:e,overlays:b,fe:f,values:d}}Yb(Sh);Yb(Zh);Zh.forEach(function(b){Sh.forEach(function(c){$b(b,c,Th);$b(c,b,Uh)})});function bl(b){T.call(this);this.l=b.id;this.j=void 0!==b.insertFirst?b.insertFirst:!0;this.o=void 0!==b.stopEvent?b.stopEvent:!0;this.b=document.createElement("DIV");this.b.className="ol-overlay-container";this.b.style.position="absolute";this.autoPan=void 0!==b.autoPan?b.autoPan:!1;this.h=void 0!==b.autoPanAnimation?b.autoPanAnimation:{};this.i=void 0!==b.autoPanMargin?b.autoPanMargin:20;this.a={ib:"",mb:"",qb:"",rb:"",visible:!0};this.c=null;M(this,U("element"),this.Xc,this);M(this,U("map"),this.fd,
313
this);M(this,U("offset"),this.gd,this);M(this,U("position"),this.jd,this);M(this,U("positioning"),this.kd,this);void 0!==b.element&&this.set("element",b.element);this.set("offset",void 0!==b.offset?b.offset:[0,0]);this.set("positioning",void 0!==b.positioning?b.positioning:"top-left");void 0!==b.position&&this.set("position",b.position)}H(bl,T);q=bl.prototype;q.ya=function(){return this.l};q.Xc=function(){for(var b=this.b,c;c=b.firstChild;)b.removeChild(c);(b=this.get("element"))&&this.b.appendChild(b)};
314
q.fd=function(){this.c&&(Td(this.b),L(this.c),this.c=null);var b=this.get("map");b&&(this.c=M(b,"postrender",this.render,this),cl(this),b=this.o?b.l:b.o,this.j?b.insertBefore(this.b,b.childNodes[0]||null):b.appendChild(this.b))};q.render=function(){cl(this)};q.gd=function(){cl(this)};
315
q.jd=function(){cl(this);if(void 0!==this.get("position")&&this.autoPan){var b=this.get("map");if(void 0!==b&&b.$a()){var c=dl(b.$a(),b.ba()),d=this.get("element"),e=d.offsetWidth,f=d.currentStyle||I.getComputedStyle(d),e=e+(parseInt(f.marginLeft,10)+parseInt(f.marginRight,10)),f=d.offsetHeight,g=d.currentStyle||I.getComputedStyle(d),f=f+(parseInt(g.marginTop,10)+parseInt(g.marginBottom,10)),h=dl(d,[e,f]),d=this.i;wb(c,h)||(e=h[0]-c[0],f=c[2]-h[2],g=h[1]-c[1],h=c[3]-h[3],c=[0,0],0>e?c[0]=e-d:0>f&&
316
(c[0]=Math.abs(f)+d),0>g?c[1]=g-d:0>h&&(c[1]=Math.abs(h)+d),0===c[0]&&0===c[1])||(d=b.C().aa(),e=jh(b,d),c=[e[0]+c[0],e[1]+c[1]],this.h&&(this.h.source=d,b.ea(Wc(this.h))),b.C().la(b.pa(c)))}}};q.kd=function(){cl(this)};q.setMap=function(b){this.set("map",b)};
317
function dl(b,c){var d=Md(b),e=new Id(0,0),f;f=d?Md(d):document;var g;(g=!ud||9<=Number(Gd))||(Kd(f),g=!0);b!=(g?f.documentElement:f.body)&&(f=Yd(b),g=Kd(d).a,d=g.scrollingElement?g.scrollingElement:xd?g.body||g.documentElement:g.documentElement,g=g.parentWindow||g.defaultView,d=ud&&Ed("10")&&g.pageYOffset!=d.scrollTop?new Id(d.scrollLeft,d.scrollTop):new Id(g.pageXOffset||d.scrollLeft,g.pageYOffset||d.scrollTop),e.x=f.left+d.x,e.y=f.top+d.y);return[e.x,e.y,e.x+c[0],e.y+c[1]]}
318
function el(b,c){b.a.visible!==c&&(ae(b.b,c),b.a.visible=c)}
319
function cl(b){var c=b.get("map"),d=b.get("position");if(void 0!==c&&c.b&&void 0!==d){var d=jh(c,d),e=c.ba(),c=b.b.style,f=b.get("offset"),g=b.get("positioning"),h=f[0],f=f[1];if("bottom-right"==g||"center-right"==g||"top-right"==g)""!==b.a.mb&&(b.a.mb=c.left=""),h=Math.round(e[0]-d[0]-h)+"px",b.a.qb!=h&&(b.a.qb=c.right=h);else{""!==b.a.qb&&(b.a.qb=c.right="");if("bottom-center"==g||"center-center"==g||"top-center"==g)h-=Zd(b.b).width/2;h=Math.round(d[0]+h)+"px";b.a.mb!=h&&(b.a.mb=c.left=h)}if("bottom-left"==
320
g||"bottom-center"==g||"bottom-right"==g)""!==b.a.rb&&(b.a.rb=c.top=""),d=Math.round(e[1]-d[1]-f)+"px",b.a.ib!=d&&(b.a.ib=c.bottom=d);else{""!==b.a.ib&&(b.a.ib=c.bottom="");if("center-left"==g||"center-center"==g||"center-right"==g)f-=Zd(b.b).height/2;d=Math.round(d[1]+f)+"px";b.a.rb!=d&&(b.a.rb=c.top=d)}el(b,!0)}else el(b,!1)};function fl(b){b=b?b:{};this.c=void 0!==b.collapsed?b.collapsed:!0;this.j=void 0!==b.collapsible?b.collapsible:!0;this.j||(this.c=!1);var c=void 0!==b.className?b.className:"ol-overviewmap",d=void 0!==b.tipLabel?b.tipLabel:"Overview map",e=void 0!==b.collapseLabel?b.collapseLabel:"\u00ab";this.o="string"===typeof e?Qd("SPAN",{},e):e;e=void 0!==b.label?b.label:"\u00bb";this.s="string"===typeof e?Qd("SPAN",{},e):e;d=Qd("BUTTON",{type:"button",title:d},this.j&&!this.c?this.o:this.s);M(d,"click",this.v,
321
this);e=document.createElement("DIV");e.className="ol-overviewmap-map";var f=this.b=new Z({controls:new ed,interactions:new ed,target:e,view:b.view});b.layers&&b.layers.forEach(function(b){f.Tb(b)},this);var g=document.createElement("DIV");g.className="ol-overviewmap-box";g.style.boxSizing="border-box";this.l=new bl({position:[0,0],positioning:"bottom-left",element:g});this.b.v.push(this.l);c=Qd("DIV",c+" ol-unselectable ol-control"+(this.c&&this.j?" ol-collapsed":"")+(this.j?"":" ol-uncollapsible"),
322
e,d);ge.call(this,{element:c,render:b.render?b.render:gl,target:b.target})}H(fl,ge);fl.prototype.setMap=function(b){var c=this.a;b!==c&&(c&&(c=c.C())&&Ta(c,U("rotation"),this.i,this),fl.R.setMap.call(this,b),b&&(this.h.push(M(b,"propertychange",this.u,this)),0===this.b.pc().get("length")&&(c=al(b),this.b.set("layergroup",c)),b=b.C()))&&(M(b,U("rotation"),this.i,this),Rc(b)&&(this.b.fb(),hl(this)))};
323
fl.prototype.u=function(b){"view"===b.key&&((b=b.oldValue)&&Ta(b,U("rotation"),this.i,this),b=this.a.C(),M(b,U("rotation"),this.i,this))};fl.prototype.i=function(){var b=this.b.C(),c=this.a.C().N();b.set("rotation",c)};
324
function gl(){var b=this.a,c=this.b;if(b.b&&c.b){var d=b.ba(),b=Pc(b.C(),d),e=c.ba(),d=Pc(c.C(),e),f=jh(c,Kb(b)),g=jh(c,[b[2],b[1]]),c=Math.abs(f[0]-g[0]),f=Math.abs(f[1]-g[1]),g=e[0],e=e[1];c<.1*g||f<.1*e||c>.75*g||f>.75*e?hl(this):wb(d,b)||(b=this.b,d=this.a.C(),b.C().la(d.aa()))}il(this)}function hl(b){var c=b.a;b=b.b;var d=c.ba(),c=Pc(c.C(),d),d=b.ba();b=b.C();Lb(c,1/(.1*Math.pow(2,Math.log(7.5)/Math.LN2/2)));b.ic(c,d)}
325
function il(b){var c=b.a,d=b.b;if(c.b&&d.b){var e=c.ba(),f=c.C(),g=d.C();d.ba();var d=f.N(),c=b.l,h=b.l.get("element"),f=Pc(f,e),e=g.G(),g=Fb(f),f=[f[2],f[3]],k;if(b=b.a.C().aa())k=[g[0]-b[0],g[1]-b[1]],qb(k,d),pb(k,b);c.set("position",k);h&&(h.style.width=Math.abs((g[0]-f[0])/e)+"px",h.style.height=Math.abs((f[1]-g[1])/e)+"px")}}fl.prototype.v=function(b){b.preventDefault();jl(this)};
326
function jl(b){b.element.classList.toggle("ol-collapsed");b.c?Ud(b.o,b.s):Ud(b.s,b.o);b.c=!b.c;var c=b.b;b.c||c.b||(c.fb(),hl(b),Sa(c,"postrender",function(){il(this)},b))};function kl(b,c,d,e,f){var g=NaN,h=NaN,k=(d-c)/e;if(0!==k)if(1==k)g=b[c],h=b[c+1];else if(2==k)g=.5*b[c]+.5*b[c+e],h=.5*b[c+1]+.5*b[c+e+1];else{var h=b[c],k=b[c+1],l=0,g=[0],m;for(m=c+e;m<d;m+=e){var n=b[m],p=b[m+1],l=l+Math.sqrt((n-h)*(n-h)+(p-k)*(p-k));g.push(l);h=n;k=p}d=.5*l;l=0;m=g.length;for(n=!1;l<m;)h=l+(m-l>>1),k=+cb(g[h],d),0>k?l=h+1:(m=h,n=!k);h=n?l:~l;0>h?(d=(d-g[-h-2])/(g[-h-1]-g[-h-2]),c+=(-h-2)*e,g=b[c],g+=d*(b[c+e]-g),h=b[c+1],h+=d*(b[c+e+1]-h)):(g=b[c+h*e],h=b[c+h*e+1])}return f?
327
(f[0]=g,f[1]=h,f):[g,h]};function ll(b,c){V.call(this);this.c=null;this.i=-1;this.U(b,c)}H(ll,V);q=ll.prototype;q.clone=function(){var b=new ll(null);W(b,this.h,this.a.slice());b.f();return b};q.xa=function(){return zc(this.a,0,this.a.length,this.b)};function Bi(b){if(b.i!=b.g){var c;c=kl(b.a,0,b.a.length,b.b,b.c);b.c=c;b.i=b.g}return b.c}q.Ma=function(b){var c=[];c.length=Bc(this.a,0,this.a.length,this.b,b,c,0);b=new ll(null);W(b,"XY",c);b.f();return b};q.X=function(){return"LineString"};
328
q.U=function(b,c){b?(vc(this,c,b,1),this.a||(this.a=[]),this.a.length=xc(this.a,0,b,this.b)):W(this,"XY",null);this.f()};function ml(b,c){V.call(this);this.c=[];this.U(b,c)}H(ml,V);q=ml.prototype;q.clone=function(){var b=new ml(null),c=this.c.slice();W(b,this.h,this.a.slice());b.c=c;b.f();return b};q.xa=function(){return Ac(this.a,0,this.c,this.b)};q.Za=function(){return this.c};function Ci(b){var c=[],d=b.a,e=0,f=b.c;b=b.b;var g,h;g=0;for(h=f.length;g<h;++g){var k=f[g],e=kl(d,e,k,b);eb(c,e);e=k}return c}
329
q.Ma=function(b){var c=[],d=[],e=this.a,f=this.c,g=this.b,h=0,k=0,l,m;l=0;for(m=f.length;l<m;++l){var n=f[l],k=Bc(e,h,n,g,b,c,k);d.push(k);h=n}c.length=k;b=new ml(null);W(b,"XY",c);b.c=d;b.f();return b};q.X=function(){return"MultiLineString"};q.U=function(b,c){if(b){vc(this,c,b,2);this.a||(this.a=[]);var d=yc(this.a,0,b,this.b,this.c);this.a.length=0===d.length?0:d[d.length-1]}else d=this.c,W(this,"XY",null),this.c=d;this.f()};function nl(b,c){V.call(this);this.U(b,c)}H(nl,V);nl.prototype.clone=function(){var b=new nl(null);W(b,this.h,this.a.slice());b.f();return b};nl.prototype.xa=function(){return zc(this.a,0,this.a.length,this.b)};nl.prototype.X=function(){return"MultiPoint"};nl.prototype.U=function(b,c){b?(vc(this,c,b,1),this.a||(this.a=[]),this.a.length=xc(this.a,0,b,this.b)):W(this,"XY",null);this.f()};function pl(b,c){V.call(this);this.c=[];this.u=-1;this.v=null;this.w=-1;this.i=null;this.U(b,c)}H(pl,V);q=pl.prototype;q.clone=function(){for(var b=new pl(null),c=this.c.length,d=Array(c),e=0;e<c;++e)d[e]=this.c[e].slice();W(b,this.h,this.a.slice());b.c=d;b.f();return b};q.xa=function(b){var c;void 0!==b?(c=Di(this).slice(),Kc(c,this.c,this.b,b)):c=this.a;b=c;c=this.c;var d=this.b,e=0,f=[],g=0,h,k;h=0;for(k=c.length;h<k;++h){var l=c[h];f[g++]=Ac(b,e,l,d,f[g]);e=l[l.length-1]}f.length=g;return f};
330
function Ei(b){if(b.u!=b.g){var c=b.a,d=b.c,e=b.b,f=0,g=[],h,k;h=0;for(k=d.length;h<k;++h){var l=d[h],f=Ab(xb(Infinity,Infinity,-Infinity,-Infinity,void 0),c,f,l[0],e);g.push((f[0]+f[2])/2,(f[1]+f[3])/2);f=l[l.length-1]}c=Di(b);d=b.c;e=b.b;h=0;k=[];l=0;for(f=d.length;l<f;++l){var m=d[l];k=Gc(c,h,m,e,g,2*l,k);h=m[m.length-1]}b.v=k;b.u=b.g}return b.v}
331
function Di(b){if(b.w!=b.g){var c=b.a,d;a:{d=b.c;var e,f;e=0;for(f=d.length;e<f;++e)if(!Ic(c,d[e],b.b,void 0)){d=!1;break a}d=!0}d?b.i=c:(b.i=c.slice(),b.i.length=Kc(b.i,b.c,b.b));b.w=b.g}return b.i}q.Ma=function(b){var c=[],d=[],e=this.a,f=this.c,g=this.b;b=Math.sqrt(b);var h=0,k=0,l,m;l=0;for(m=f.length;l<m;++l){var n=f[l],p=[],k=Cc(e,h,n,g,b,c,k,p);d.push(p);h=n[n.length-1]}c.length=k;e=new pl(null);W(e,"XY",c);e.c=d;e.f();return e};q.X=function(){return"MultiPolygon"};
332
q.U=function(b,c){if(b){vc(this,c,b,3);this.a||(this.a=[]);var d=this.a,e=this.b,f=this.c,g=0,f=f?f:[],h=0,k,l;k=0;for(l=b.length;k<l;++k)g=yc(d,g,b[k],e,f[h]),f[h++]=g,g=g[g.length-1];f.length=h;0===f.length?this.a.length=0:(d=f[f.length-1],this.a.length=0===d.length?0:d[d.length-1])}else d=this.c,W(this,"XY",null),this.c=d;this.f()};function ql(b,c,d){V.call(this);rl(this,b,c?c:0,d)}H(ql,V);ql.prototype.clone=function(){var b=new ql(null);W(b,this.h,this.a.slice());b.f();return b};ql.prototype.Db=function(b){var c=this.a,d=c[this.b]-c[0];return xb(c[0]-d,c[1]-d,c[0]+d,c[1]+d,b)};ql.prototype.X=function(){return"Circle"};function rl(b,c,d,e){if(c){vc(b,e,c,0);b.a||(b.a=[]);e=b.a;c=wc(e,c);e[c++]=e[0]+d;var f;d=1;for(f=b.b;d<f;++d)e[c++]=e[d];e.length=c}else W(b,"XY",null);b.f()};function sl(b,c,d,e,f,g,h){og.call(this,b,c,d,0,e);this.j=f;this.a=new Image;null!==g&&(this.a.crossOrigin=g);this.g={};this.f=null;this.state=0;this.i=h}H(sl,og);sl.prototype.b=function(b){if(void 0!==b){var c;b=x(b);if(b in this.g)return this.g[b];Ka(this.g)?c=this.a:c=this.a.cloneNode(!1);return this.g[b]=c}return this.a};sl.prototype.l=function(){this.state=3;this.f.forEach(L);this.f=null;pg(this)};
333
sl.prototype.o=function(){void 0===this.resolution&&(this.resolution=Eb(this.extent)/this.a.height);this.state=2;this.f.forEach(L);this.f=null;pg(this)};sl.prototype.load=function(){0==this.state&&(this.state=1,pg(this),this.f=[Sa(this.a,"error",this.l,this),Sa(this.a,"load",this.o,this)],this.i(this,this.j))};function tl(b,c,d,e,f){me.call(this,b,c);this.h=d;this.b=new Image;null!==e&&(this.b.crossOrigin=e);this.f={};this.c=null;this.i=f}H(tl,me);q=tl.prototype;q.L=function(){1==this.state&&ul(this);this.a&&Wa(this.a);this.state=5;ne(this);tl.R.L.call(this)};q.ra=function(b){if(void 0!==b){var c=x(b);if(c in this.f)return this.f[c];b=Ka(this.f)?this.b:this.b.cloneNode(!1);return this.f[c]=b}return this.b};q.getKey=function(){return this.h};q.Id=function(){this.state=3;ul(this);ne(this)};
334
q.Jd=function(){this.state=this.b.naturalWidth&&this.b.naturalHeight?2:4;ul(this);ne(this)};q.load=function(){0==this.state&&(this.state=1,ne(this),this.c=[Sa(this.b,"error",this.Id,this),Sa(this.b,"load",this.Jd,this)],this.i(this,this.h))};function ul(b){b.c.forEach(L);b.c=null};function vl(b){b=b?b:{};ch.call(this,{handleDownEvent:wl,handleDragEvent:xl,handleUpEvent:yl});this.i=b.condition?b.condition:$g;this.a=this.b=void 0;this.h=0;this.j=void 0!==b.duration?b.duration:400}H(vl,ch);
335
function xl(b){if(bh(b)){var c=b.map,d=c.ba(),e=b.pixel;b=e[0]-d[0]/2;e=d[1]/2-e[1];d=Math.atan2(e,b);b=Math.sqrt(b*b+e*e);e=c.C();c.render();if(void 0!==this.b){var f=d-this.b;Sg(c,e,e.N()-f)}this.b=d;void 0!==this.a&&(d=this.a*(e.G()/b),Ug(c,e,d));void 0!==this.a&&(this.h=this.a/b);this.a=b}}
336
function yl(b){if(!bh(b))return!0;b=b.map;var c=b.C();Sc(c,-1);var d=this.h-1,e=c.N(),e=c.constrainRotation(e,0);Sg(b,c,e,void 0,void 0);var e=c.G(),f=this.j,e=c.constrainResolution(e,0,d);Ug(b,c,e,void 0,f);this.h=0;return!1}function wl(b){return bh(b)&&this.i(b)?(Sc(b.map.C(),1),this.a=this.b=void 0,!0):!1};function zl(b,c){R.call(this,b);this.feature=c}H(zl,R);
337
function Al(b){ch.call(this,{handleDownEvent:Bl,handleEvent:Cl,handleUpEvent:Dl});this.O=null;this.o=!1;this.gb=b.source?b.source:null;this.ta=b.features?b.features:null;this.Kc=b.snapTolerance?b.snapTolerance:12;this.D=b.type;this.b=El(this.D);this.oa=b.minPoints?b.minPoints:this.b===Fl?3:2;this.na=b.maxPoints?b.maxPoints:Infinity;this.tb=b.finishCondition?b.finishCondition:Mb;var c=b.geometryFunction;if(!c)if("Circle"===this.D)c=function(b,c){var d=c?c:new ql([NaN,NaN]),h=b[0],k=b[1],l=h[0]-k[0],
338
h=h[1]-k[1];rl(d,b[0],Math.sqrt(l*l+h*h));return d};else{var d,c=this.b;c===Gl?d=Ec:c===Hl?d=ll:c===Fl&&(d=Lc);c=function(b,c){var g=c;g?g.U(b):g=new d(b);return g}}this.u=c;this.w=this.j=this.a=this.l=this.h=this.i=null;this.Lc=b.clickTolerance?b.clickTolerance*b.clickTolerance:36;this.S=new ti({source:new Kj({useSpatialIndex:!1,wrapX:b.wrapX?b.wrapX:!1}),style:b.style?b.style:Il()});this.Ja=b.geometryName;this.Hc=b.condition?b.condition:Zg;this.ma=b.freehandCondition?b.freehandCondition:$g;M(this,
339
U("active"),this.hb,this)}H(Al,ch);function Il(){var b=si();return function(c){return b[c.M().X()]}}Al.prototype.setMap=function(b){Al.R.setMap.call(this,b);this.hb()};function Cl(b){this.b!==Hl&&this.b!==Fl||!this.ma(b)||(this.o=!0);var c=!this.o;this.o&&b.type===gg?(Jl(this,b),c=!1):b.type===fg?c=Kl(this,b):b.type===$f&&(c=!1);return dh.call(this,b)&&c}function Bl(b){return this.Hc(b)?(this.O=b.pixel,!0):this.o?(this.O=b.pixel,this.i||Ll(this,b),!0):!1}
340
function Dl(b){this.o=!1;var c=this.O,d=b.pixel,e=c[0]-d[0],c=c[1]-d[1],d=!0;e*e+c*c<=this.Lc&&(Kl(this,b),this.i?this.b===Ml?Nl(this):Ol(this,b)?this.tb(b)&&Nl(this):Jl(this,b):(Ll(this,b),this.b===Gl&&Nl(this)),d=!1);return d}
341
function Kl(b,c){if(b.i){var d=c.coordinate,e=b.h.M(),f;b.b===Gl?f=b.a:b.b===Fl?(f=b.a[0],f=f[f.length-1],Ol(b,c)&&(d=b.i.slice())):(f=b.a,f=f[f.length-1]);f[0]=d[0];f[1]=d[1];b.u(b.a,e);b.l&&b.l.M().U(d);e instanceof Lc&&b.b!==Fl?(b.j||(b.j=new Y(new ll(null))),0>=e.c.length?e=null:(d=new Dc(null),W(d,e.h,e.a.slice(0,e.c[0])),d.f(),e=d),d=b.j.M(),W(d,e.h,e.a),d.f()):b.w&&(d=b.j.M(),d.U(b.w));Pl(b)}else e=c.coordinate.slice(),b.l?b.l.M().U(e):(b.l=new Y(new Ec(e)),Pl(b));return!0}
342
function Ol(b,c){var d=!1;if(b.h){var e=!1,f=[b.i];b.b===Hl?e=b.a.length>b.oa:b.b===Fl&&(e=b.a[0].length>b.oa,f=[b.a[0][0],b.a[0][b.a[0].length-2]]);if(e)for(var e=c.map,g=0,h=f.length;g<h;g++){var k=f[g],l=jh(e,k),m=c.pixel,d=m[0]-l[0],l=m[1]-l[1],m=b.o&&b.ma(c)?1:b.Kc;if(d=Math.sqrt(d*d+l*l)<=m){b.i=k;break}}}return d}
343
function Ll(b,c){var d=c.coordinate;b.i=d;b.b===Gl?b.a=d.slice():b.b===Fl?(b.a=[[d.slice(),d.slice()]],b.w=b.a[0]):(b.a=[d.slice(),d.slice()],b.b===Ml&&(b.w=b.a));b.w&&(b.j=new Y(new ll(b.w)));d=b.u(b.a);b.h=new Y;b.Ja&&zj(b.h,b.Ja);b.h.Fa(d);Pl(b);S(b,new zl("drawstart",b.h))}
344
function Jl(b,c){var d=c.coordinate,e=b.h.M(),f,g;if(b.b===Hl)b.i=d.slice(),g=b.a,g.push(d.slice()),f=g.length>b.na,b.u(g,e);else if(b.b===Fl){g=b.a[0];g.push(d.slice());if(f=g.length>b.na)b.i=g[0];b.u(b.a,e)}Pl(b);f&&Nl(b)}
345
function Nl(b){var c=Ql(b),d=b.a,e=c.M();b.b===Hl?(d.pop(),b.u(d,e)):b.b===Fl&&(d[0].pop(),d[0].push(d[0][0]),b.u(d,e));"MultiPoint"===b.D?c.Fa(new nl([d])):"MultiLineString"===b.D?c.Fa(new ml([d])):"MultiPolygon"===b.D&&c.Fa(new pl([d]));S(b,new zl("drawend",c));b.ta&&b.ta.push(c);b.gb&&b.gb.yb(c)}function Ql(b){b.i=null;var c=b.h;c&&(b.h=null,b.l=null,b.j=null,b.S.T().clear(!0));return c}Al.prototype.v=Nb;
346
function Pl(b){var c=[];b.h&&c.push(b.h);b.j&&c.push(b.j);b.l&&c.push(b.l);b=b.S.T();b.clear(!0);b.zb(c)}Al.prototype.hb=function(){var b=this.P,c=this.get("active");b&&c||Ql(this);this.S.setMap(c?b:null)};function El(b){var c;"Point"===b||"MultiPoint"===b?c=Gl:"LineString"===b||"MultiLineString"===b?c=Hl:"Polygon"===b||"MultiPolygon"===b?c=Fl:"Circle"===b&&(c=Ml);return c}var Gl="Point",Hl="LineString",Fl="Polygon",Ml="Circle";function Rl(b,c,d,e,f,g,h,k,l,m,n){me.call(this,f,0);this.F=void 0!==n?n:!1;this.s=h;this.o=k;this.g=null;this.f={};this.c=c;this.i=e;this.j=g?g:f;this.b=[];this.Qa=null;this.h=0;g=ve(e,this.j);k=this.i.B();f=this.c.B();g=k?Ib(g,k):g;if(0===Bb(g))this.state=4;else if((k=b.B())&&(f?f=Ib(f,k):f=k),e=e.G(this.j[0]),e=kj(b,d,Gb(g),e),!isFinite(e)||0>=e)this.state=4;else if(this.l=new nj(b,d,g,f,e*(void 0!==m?m:.5)),0===this.l.g.length)this.state=4;else if(this.h=De(c,e),d=pj(this.l),f&&(b.b?(d[1]=Ba(d[1],
347
f[1],f[3]),d[3]=Ba(d[3],f[1],f[3])):d=Ib(d,f)),Bb(d))if(b=xe(c,d,this.h),100>b.ga()*(b.g-b.b+1)){for(c=b.a;c<=b.f;c++)for(d=b.b;d<=b.g;d++)(m=l(this.h,c,d,h))&&this.b.push(m);0===this.b.length&&(this.state=4)}else this.state=3;else this.state=4}H(Rl,me);Rl.prototype.L=function(){1==this.state&&(this.Qa.forEach(L),this.Qa=null);Rl.R.L.call(this)};Rl.prototype.ra=function(b){if(void 0!==b){var c=x(b);if(c in this.f)return this.f[c];b=Ka(this.f)?this.g:this.g.cloneNode(!1);return this.f[c]=b}return this.g};
348
Rl.prototype.cb=function(){var b=[];this.b.forEach(function(c){c&&2==c.I()&&b.push({extent:ve(this.c,c.V),image:c.ra()})},this);this.b.length=0;if(0===b.length)this.state=3;else{var c=this.j[0],d=Ce(this.i,c),e=fa(d)?d:d[0],d=fa(d)?d:d[1],c=this.i.G(c),f=this.c.G(this.h),g=ve(this.i,this.j);this.g=mj(e,d,this.s,f,this.c.B(),c,g,this.l,b,this.o,this.F);this.state=2}ne(this)};
349
Rl.prototype.load=function(){if(0==this.state){this.state=1;ne(this);var b=0;this.Qa=[];this.b.forEach(function(c){var d=c.I();if(0==d||1==d){b++;var e;e=M(c,"change",function(){var d=c.I();if(2==d||3==d||4==d)L(e),b--,0===b&&(this.Qa.forEach(L),this.Qa=null,this.cb())},this);this.Qa.push(e)}},this);this.b.forEach(function(b){0==b.I()&&b.load()});0===b&&I.setTimeout(this.cb.bind(this),0)}};function Sl(b){ak.call(this,{attributions:b.attributions,cacheSize:b.cacheSize,extent:b.extent,logo:b.logo,opaque:b.opaque,projection:b.projection,state:b.state,tileGrid:b.tileGrid,tileLoadFunction:b.tileLoadFunction?b.tileLoadFunction:Tl,tilePixelRatio:b.tilePixelRatio,tileUrlFunction:b.tileUrlFunction,url:b.url,urls:b.urls,wrapX:b.wrapX});this.crossOrigin=void 0!==b.crossOrigin?b.crossOrigin:null;this.tileClass=void 0!==b.tileClass?b.tileClass:tl;this.b={};this.i={};this.w=b.reprojectionErrorThreshold}
350
H(Sl,ak);q=Sl.prototype;q.sc=function(){if(le(this.a))return!0;for(var b in this.b)if(le(this.b[b]))return!0;return!1};q.Ka=function(b,c){var d=this.ab(b);this.a.Ka(this.a==d?c:{});for(var e in this.b){var f=this.b[e];f.Ka(f==d?c:{})}};q.Fb=function(){return 0};q.Hb=function(b){return this.c&&b&&!dc(this.c,b)?!1:Sl.R.Hb.call(this,b)};q.qa=function(b){var c=this.c;return!this.tileGrid||c&&!dc(c,b)?(c=x(b).toString(),c in this.i||(this.i[c]=Fe(b)),this.i[c]):this.tileGrid};
351
q.ab=function(b){var c=this.c;if(!c||dc(c,b))return this.a;b=x(b).toString();b in this.b||(this.b[b]=new ke);return this.b[b]};function Ul(b,c,d,e,f,g,h){c=[c,d,e];f=(d=Ke(b,c,g))?b.tileUrlFunction(d,f,g):void 0;f=new b.tileClass(c,void 0!==f?0:4,void 0!==f?f:"",b.crossOrigin,b.tileLoadFunction);f.key=h;M(f,"change",b.u,b);return f}
352
function Bg(b,c,d,e,f,g){if(b.c&&g&&!dc(b.c,g)){f=b.ab(g);d=[c,d,e];c=b.jb.apply(b,d);if(ie(f,c))return f.get(c);var h=b.c;e=b.qa(h);var k=b.qa(g),l=Ke(b,d,g);b=new Rl(h,e,g,k,d,l,b.j,0,function(b,c,d,e){return Vl(this,b,c,d,e,h)}.bind(b),b.w,!1);f.set(c,b);return b}return Vl(b,c,d,e,f,g)}
353
function Vl(b,c,d,e,f,g){var h,k=b.jb(c,d,e),l=b.getKey();if(ie(b.a,k)){if(h=b.a.get(k),h.key!=l){var m=h;h.a&&h.a.key==l?(h=h.a,2==m.I()&&(h.a=m)):(h=Ul(b,c,d,e,f,g,l),2==m.I()?h.a=m:m.a&&2==m.a.I()&&(h.a=m.a,m.a=null));h.a&&(h.a.a=null);b.a.replace(k,h)}}else h=Ul(b,c,d,e,f,g,l),b.a.set(k,h);return h}function Tl(b,c){b.ra().src=c};function Wl(b){var c=b.imageExtent,d=void 0!==b.crossOrigin?b.crossOrigin:null,e=void 0!==b.imageLoadFunction?b.imageLoadFunction:yj;rj.call(this,{attributions:b.attributions,logo:b.logo,projection:Vb(b.projection)});this.b=new sl(c,void 0,1,this.o,b.url,d,e);this.i=b.imageSize?b.imageSize:null;M(this.b,"change",this.h,this)}H(Wl,rj);function tj(b,c){return Jb(c,b.b.B())?b.b:null}
354
Wl.prototype.h=function(b){if(2==this.b.I()){var c=this.b.B(),d=this.b.b(),e,f;this.i?(e=this.i[0],f=this.i[1]):(e=d.width,f=d.height);c=Math.ceil(Db(c)/(Eb(c)/f));if(c!=e){var c=af(c,f),g=c.canvas;c.drawImage(d,0,0,e,f,0,0,g.width,g.height);this.b.a=g}}Wl.R.h.call(this,b)};function Xl(b){b=b||{};var c=b.size,d=c[0],e=c[1],f=[],g=256;switch(void 0!==b.tierSizeCalculation?b.tierSizeCalculation:"default"){case "default":for(;d>g||e>g;)f.push([Math.ceil(d/g),Math.ceil(e/g)]),g+=g;break;case "truncated":for(;d>g||e>g;)f.push([Math.ceil(d/g),Math.ceil(e/g)]),d>>=1,e>>=1}f.push([1,1]);f.reverse();for(var g=[1],h=[0],e=1,d=f.length;e<d;e++)g.push(1<<e),h.push(f[e-1][0]*f[e-1][1]+h[e-1]);g.reverse();var e=void 0!==b.offset?b.offset:[0,0],c=[e[0],e[1]+-c[1],e[0]+c[0],e[1]],c=
0 ignored issues
show
Coding Style introduced by
As per coding-style, switch statements should have a default case.
Loading history...
355
new re({extent:c,origin:Kb(c),resolutions:g}),k=b.url;Sl.call(this,{attributions:b.attributions,cacheSize:b.cacheSize,crossOrigin:b.crossOrigin,logo:b.logo,reprojectionErrorThreshold:b.reprojectionErrorThreshold,tileClass:Yl,tileGrid:c,tileUrlFunction:function(b){if(b){var c=b[0],d=b[1];b=-b[2]-1;return k+"TileGroup"+((d+b*f[c][0]+h[c])/256|0)+"/"+c+"-"+d+"-"+b+".jpg"}}})}H(Xl,Sl);function Yl(b,c,d,e,f){tl.call(this,b,c,d,e,f);this.g={}}H(Yl,tl);
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if b is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
356
Yl.prototype.ra=function(b){var c=void 0!==b?x(b).toString():"";if(c in this.g)return this.g[c];b=Yl.R.ra.call(this,b);if(2==this.state){if(256==b.width&&256==b.height)return this.g[c]=b;var d=af(256,256);d.drawImage(b,0,0);return this.g[c]=d.canvas}return b};B("ol.animation.rotate",Xc);B("ol.animation.zoom",Yc);B("ol.Collection",ed);ed.prototype.getArray=ed.prototype.Hd;B("ol.control.Control",ge);ge.prototype.changed=ge.prototype.f;B("ol.control.Zoom",Qe);B("ol.control.MousePosition",Re);B("ol.control.OverviewMap",fl);B("ol.coordinate.createStringXY",function(b){return function(c){return c?"{x}, {y}".replace("{x}",c[0].toFixed(b)).replace("{y}",c[1].toFixed(b)):""}});B("ol.events.condition.noModifierKeys",Zg);B("ol.extent.getCenter",Gb);
357
B("ol.extent.getIntersection",Ib);B("ol.extent.getTopLeft",Kb);B("ol.Feature",Y);Y.prototype.clone=Y.prototype.clone;Y.prototype.get=Y.prototype.get;Y.prototype.getId=Y.prototype.ya;Y.prototype.getGeometry=Y.prototype.M;Y.prototype.setGeometry=Y.prototype.Fa;Y.prototype.setId=Y.prototype.ge;Y.prototype.setProperties=Y.prototype.F;B("ol.geom.Polygon",Lc);Lc.prototype.getCoordinates=Lc.prototype.xa;Lc.prototype.getExtent=Lc.prototype.B;Lc.prototype.setCoordinates=Lc.prototype.U;B("ol.has.CANVAS",lf);
358
B("ol.inherits",H);B("ol.interaction.DragBox",sh);B("ol.interaction.DragPan",fh);B("ol.interaction.DragRotate",kh);B("ol.interaction.DragRotateAndZoom",vl);B("ol.interaction.DragZoom",xh);B("ol.interaction.Draw",Al);Al.prototype.on=Al.prototype.$;B("ol.interaction.KeyboardPan",yh);B("ol.interaction.KeyboardZoom",Ah);B("ol.interaction.MouseWheelZoom",Ch);B("ol.interaction.PinchRotate",Eh);B("ol.interaction.PinchZoom",Ih);tl.prototype.getImage=tl.prototype.ra;B("ol.layer.Image",$h);
359
B("ol.layer.Layer",mg);mg.prototype.changed=mg.prototype.f;mg.prototype.getSource=mg.prototype.T;mg.prototype.on=mg.prototype.$;mg.prototype.un=mg.prototype.da;B("ol.layer.Tile",ai);B("ol.layer.Vector",ti);ti.prototype.getSource=ti.prototype.T;B("ol.proj.Projection",Sb);Sb.prototype.getExtent=Sb.prototype.B;B("ol.Map",Z);Z.prototype.addControl=Z.prototype.Ic;Z.prototype.addInteraction=Z.prototype.Jc;Z.prototype.addLayer=Z.prototype.Tb;Z.prototype.beforeRender=Z.prototype.ea;
360
Z.prototype.forEachFeatureAtPixel=Z.prototype.Nc;Z.prototype.getEventCoordinate=Z.prototype.Oc;Z.prototype.getLayers=Z.prototype.pc;Z.prototype.getSize=Z.prototype.ba;Z.prototype.getTargetElement=Z.prototype.$a;Z.prototype.getView=Z.prototype.C;Z.prototype.on=Z.prototype.$;Z.prototype.render=Z.prototype.render;Z.prototype.renderSync=Z.prototype.ee;Z.prototype.removeInteraction=Z.prototype.ae;Z.prototype.removeLayer=Z.prototype.be;Z.prototype.un=Z.prototype.da;Z.prototype.updateSize=Z.prototype.fb;
361
B("ol.proj.Projection",Sb);B("ol.source.ImageStatic",Wl);pe.prototype.getProjection=pe.prototype.O;B("ol.source.TileImage",Sl);B("ol.source.Vector",Kj);Kj.prototype.addFeature=Kj.prototype.yb;Kj.prototype.addFeatures=Kj.prototype.zb;Kj.prototype.clear=Kj.prototype.clear;Kj.prototype.getFeatures=Kj.prototype.Od;Kj.prototype.removeFeature=Kj.prototype.vc;B("ol.source.Zoomify",Xl);B("ol.style.Fill",fi);B("ol.style.Style",mi);B("ol.style.Stroke",ki);B("ol.tilegrid.TileGrid",re);B("ol.View",X);
362
X.prototype.fit=X.prototype.ic;X.prototype.getCenter=X.prototype.aa;X.prototype.getRotation=X.prototype.N;X.prototype.getResolution=X.prototype.G;X.prototype.getZoom=X.prototype.Vc;X.prototype.on=X.prototype.$;X.prototype.rotate=X.prototype.rotate;X.prototype.setCenter=X.prototype.la;X.prototype.setResolution=X.prototype.Pa;X.prototype.setZoom=X.prototype.he;X.prototype.un=X.prototype.da;lk.prototype.getGL=lk.prototype.Pd;lk.prototype.useProgram=lk.prototype.pb;})();
363